Skip to content

Commit

Permalink
Moved Application_Properties file to Constants
Browse files Browse the repository at this point in the history
Signed-off-by: Alfredo Gutierrez <[email protected]>
  • Loading branch information
AlfredoG87 committed Aug 27, 2024
1 parent 15076c5 commit 020dd92
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
3 changes: 3 additions & 0 deletions server/src/main/java/com/hedera/block/server/Constants.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";

Expand Down
5 changes: 3 additions & 2 deletions server/src/main/java/com/hedera/block/server/Server.java
Original file line number Diff line number Diff line change
Expand Up @@ -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() {}

Expand All @@ -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();

Expand Down

0 comments on commit 020dd92

Please sign in to comment.