diff --git a/server/src/main/java/com/hedera/block/server/Constants.java b/server/src/main/java/com/hedera/block/server/Constants.java index 5b9850af..8fbd6900 100644 --- a/server/src/main/java/com/hedera/block/server/Constants.java +++ b/server/src/main/java/com/hedera/block/server/Constants.java @@ -22,6 +22,9 @@ public final class Constants { private Constants() {} + /** Constant mapped to the application.properties file in resources with default values */ + @NonNull public static final String APPLICATION_PROPERTIES = "app.properties"; + /** Constant mapped to the name of the service in the .proto file */ @NonNull public static final String SERVICE_NAME = "BlockStreamService"; diff --git a/server/src/main/java/com/hedera/block/server/Server.java b/server/src/main/java/com/hedera/block/server/Server.java index 51c8df1e..48b39490 100644 --- a/server/src/main/java/com/hedera/block/server/Server.java +++ b/server/src/main/java/com/hedera/block/server/Server.java @@ -31,7 +31,6 @@ public class Server { private static final Logger LOGGER = System.getLogger(Server.class.getName()); - private static final String APPLICATION_PROPERTIES = "app.properties"; private Server() {} @@ -49,7 +48,9 @@ public static void main(final String[] args) throws IOException { ConfigurationBuilder.create() .withSource(SystemEnvironmentConfigSource.getInstance()) .withSource(SystemPropertiesConfigSource.getInstance()) - .withSource(new ClasspathFileConfigSource(Path.of(APPLICATION_PROPERTIES))) + .withSource( + new ClasspathFileConfigSource( + Path.of(Constants.APPLICATION_PROPERTIES))) .autoDiscoverExtensions() .build();