File tree Expand file tree Collapse file tree
src/main/java/com/coze/openapi/service/utils Expand file tree Collapse file tree Original file line number Diff line number Diff line change 197197 <resource >
198198 <directory >src/main/resources</directory >
199199 <filtering >true</filtering >
200+ <includes >
201+ <include >**/version.properties</include >
202+ </includes >
200203 </resource >
201204 </resources >
202205 <plugins >
Original file line number Diff line number Diff line change 33import java .io .InputStream ;
44import java .util .Properties ;
55
6+ import org .slf4j .Logger ;
7+ import org .slf4j .LoggerFactory ;
8+
69public class VersionUtils {
10+
11+ private static final Logger logger = LoggerFactory .getLogger (VersionUtils .class );
12+
713 private static final String VERSION = readVersion ();
814
915 private static String readVersion () {
@@ -12,12 +18,12 @@ private static String readVersion() {
1218 VersionUtils .class .getClassLoader ().getResourceAsStream ("version.properties" )) {
1319 if (input != null ) {
1420 prop .load (input );
15- return prop .getProperty ("sdk.version" , "unknown " );
21+ return prop .getProperty ("sdk.version" , "" );
1622 }
1723 } catch (Exception e ) {
18- // ignore
24+ logger . error ( "Failed to read version.properties->ex:{}" , e . getMessage ());
1925 }
20- return "unknown " ;
26+ return "" ;
2127 }
2228
2329 public static String getVersion () {
You can’t perform that action at this time.
0 commit comments