Skip to content

Commit 0269f82

Browse files
authored
Adapted properties to follow the Java Spring properties standards. (#179)
1 parent c992769 commit 0269f82

File tree

5 files changed

+27
-23
lines changed

5 files changed

+27
-23
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
- stage: test
6161
name: integrationTests
6262
script:
63-
- "mvn verify -DskipUTs -Dei.backendInstancesListJsonContent=\"[{ 'contextPath': '', 'port': '${EI_BACKEND_PORT}', 'name': 'EI-Backend-1', 'host': 'localhost', 'https': false, 'defaultBackend': true}]\" -B"
63+
- "mvn verify -DskipUTs -Dei.backend.instances.list.json.content=\"[{ 'contextPath': '', 'port': '${EI_BACKEND_PORT}', 'name': 'EI-Backend-1', 'host': 'localhost', 'https': false, 'defaultBackend': true}]\" -B"
6464
- stage: deploy
6565
name: deployGitHubPages
6666
before_install: skip # do not run again

src/main/docker/docker-compose.yml

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -185,10 +185,14 @@ services:
185185
environment: # Overrides settings in application config file
186186
- spring.application.name=ei-frontend
187187
- server.port=8080
188-
- ei.frontendServiceHost=${HOST}
189-
- ei.frontendServicePort=8081
190-
- ei.backendInstancesListJsonContent=${EIFFEL2_EI_FRONTEND_EI_INSTANCES_LIST}
191-
- ei.backendInstancesFilePath=/tmp/ei-instances-list.conf
188+
- ei.frontend.service.host=${HOST}
189+
- ei.frontend.service.port=8081
190+
- ei.frontend.context.path=
191+
- ei.backend.instances.list.json.content=${EIFFEL2_EI_FRONTEND_EI_INSTANCES_LIST}
192+
- ei.backend.instances.filepath=/tmp/ei-instances-list.conf
193+
- logging.level.root=OFF
194+
- logging.level.org.springframework.web=ERROR
195+
- logging.level.com.ericsson.ei=DEBUG
192196

193197
networks:
194198
eiffel_2.0_1:

src/main/java/com/ericsson/ei/frontend/utils/BackEndInstanceFileUtils.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@ public class BackEndInstanceFileUtils {
3636
@Autowired
3737
BackEndInstancesUtils backendInstancesUtils;
3838

39-
@Value("${ei.backendInstancesFilePath:#{null}}")
39+
@Value("${ei.backend.instances.filepath:#{null}}")
4040
private String backendInstancesFilePath;
4141

42-
@Value("${ei.backendInstancesListJsonContent:#{null}}")
42+
@Value("${ei.backend.instances.list.json.content:#{null}}")
4343
private String backendInstancesListJsonContent;
4444

4545
@PostConstruct
@@ -116,7 +116,7 @@ private JsonArray parseEiInstancesListJsonObject() {
116116
if (backendInstancesListJsonContent == null || backendInstancesListJsonContent.isEmpty()) {
117117
LOG.warn("EI backend instances list json object is empty."
118118
+ "\nMake sure that EI Instances list flags is set, "
119-
+ " 'ei.backendInstancesFilePath' or 'ei.backendInstancesListJsonContent'");
119+
+ " 'ei.backend.instances.filepath' or 'ei.backend.instances.list.json.content'");
120120
return new JsonArray();
121121
}
122122

@@ -125,7 +125,7 @@ private JsonArray parseEiInstancesListJsonObject() {
125125
.parse(backendInstancesListJsonContent.toString());
126126
} catch (JsonSyntaxException e) {
127127
LOG.error("Failed to parse EI backend instances list json object."
128-
+ "\nMake sure ei.backendInstancesListJsonContent property is set with one or more EI Backend instances."
128+
+ "\nMake sure ei.backend.instances.list.json.content property is set with one or more EI Backend instances."
129129
+ "\nError message: " + e.getMessage() + "\nErrors: " + e);
130130
System.exit(1);
131131
}

src/main/java/com/ericsson/ei/frontend/utils/WebControllerUtils.java

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -40,19 +40,19 @@
4040
@AllArgsConstructor
4141
public class WebControllerUtils {
4242

43-
@Value("${ei.frontendServiceHost:#{null}}")
43+
@Value("${ei.frontend.service.host:#{null}}")
4444
private String frontendServiceHost;
4545

46-
@Value("${ei.frontendServicePort:#{null}}")
46+
@Value("${ei.frontend.service.port:#{null}}")
4747
private int frontendServicePort;
4848

49-
@Value("${ei.frontendContextPath:#{null}}")
49+
@Value("${ei.frontend.context.path:#{null}}")
5050
private String frontendContextPath;
5151

52-
@Value("${ei.useSecureHttpFrontend:#{null}}")
52+
@Value("${ei.use.secure.http.frontend:#{null}}")
5353
private boolean useSecureHttpFrontend;
5454

55-
@Value("${ei.eiffelDocumentationUrls:#{null}}")
55+
@Value("${ei.eiffel.documentation.urls:#{null}}")
5656
private String eiffelDocumentationUrls;
5757

5858
@Value("${build.version:#{null}}")

src/main/resources/application.properties

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -8,21 +8,21 @@ build.version=
88
server.port=8080
99
#server.ssl.key-store: <keystore.p12>
1010
#server.ssl.key-store-password: <mypassword>
11-
#server.ssl.keyStoreType: <PKCS12>
12-
#server.ssl.keyAlias: <tomcat>
11+
#server.ssl.key-store-type: <PKCS12>
12+
#server.ssl.key-alias: <tomcat>
1313

1414
######## EI Front-End
15-
ei.frontendServiceHost=localhost
16-
ei.frontendServicePort=8080
17-
ei.frontendContextPath=
18-
ei.useSecureHttpFrontend=false
15+
ei.frontend.service.host=localhost
16+
ei.frontend.service.port=8080
17+
ei.frontend.context.path=
18+
ei.use.secure.http.frontend=false
1919

2020
######## EI Default Back-Ends
21-
ei.backendInstancesFilePath=
22-
ei.backendInstancesListJsonContent=[{ "contextPath": "", "port": "8090", "name": "EI-Backend-1", "host": "localhost", "https": false, "defaultBackend": true}]
21+
ei.backend.instances.filepath=
22+
ei.backend.instances.list.json.content=[{ "contextPath": "", "port": "8090", "name": "EI-Backend-1", "host": "localhost", "https": false, "defaultBackend": true}]
2323

2424
###### EI Documentation Link Url ##########
25-
ei.eiffelDocumentationUrls={ "EI Frontend GitHub": "https://github.com/eiffel-community/eiffel-intelligence-frontend",\
25+
ei.eiffel.documentation.urls={ "EI Frontend GitHub": "https://github.com/eiffel-community/eiffel-intelligence-frontend",\
2626
"EI Backend GitHub": "https://github.com/eiffel-community/eiffel-intelligence",\
2727
"Eiffel Github main page": "https://github.com/eiffel-community/eiffel",\
2828
"Test Rules User Guide": "https://github.com/eiffel-community/eiffel-intelligence-frontend/blob/master/wiki/markdown/test-rules.md" }

0 commit comments

Comments
 (0)