Skip to content

Commit a834888

Browse files
committed
Fixed flaw in changing environment variables at start-up.
1 parent c89d409 commit a834888

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

.vscode/launch.json

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,7 @@
99
"console": "internalConsole",
1010
"mainClass": "sample.Application",
1111
"projectName": "workspace",
12-
"args": "-Xmx128m",
13-
"env": {
14-
"SHOW_SQL": "true",
15-
"DDL_AUTO": "create-drop",
16-
"MAIL_ENABLED": "false",
17-
"MANAGEMENT_EXPOSURE": "*"
18-
}
12+
"args": "-Xmx128m --spring.profiles.active=dev",
1913
}
2014
]
2115
}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ It is necessary to do the following step.
100100
Do the server start in the next step.
101101

102102
1. You move to the cloned *ddd-java* directory.
103-
1. Run command `gradlew bootRun`.
103+
1. Run command `./gradlew bootRun --args='--spring.profiles.active=dev'`.
104104
1. If console show "Started Application", start is completed in port 8080
105105
1. Run command `curl http://localhost:8080/actuator/health`
106106

src/main/resources/application.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,15 @@ management:
2323

2424
sample:
2525
mail.enabled: ${MAIL_ENABLED:true}
26+
27+
---
28+
spring:
29+
config.activate.on-profile: "dev"
30+
31+
spring.jpa:
32+
show-sql: true
33+
hibernate.ddl-auto: create-drop
34+
35+
management.endpoints.web.exposure.include: "*"
36+
37+
sample.mail.enabled: false

0 commit comments

Comments
 (0)