Skip to content

Commit

Permalink
Fixed flaw in changing environment variables at start-up.
Browse files Browse the repository at this point in the history
  • Loading branch information
jkazama committed Sep 11, 2024
1 parent c89d409 commit a834888
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
8 changes: 1 addition & 7 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,7 @@
"console": "internalConsole",
"mainClass": "sample.Application",
"projectName": "workspace",
"args": "-Xmx128m",
"env": {
"SHOW_SQL": "true",
"DDL_AUTO": "create-drop",
"MAIL_ENABLED": "false",
"MANAGEMENT_EXPOSURE": "*"
}
"args": "-Xmx128m --spring.profiles.active=dev",
}
]
}
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ It is necessary to do the following step.
Do the server start in the next step.

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

Expand Down
12 changes: 12 additions & 0 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,3 +23,15 @@ management:

sample:
mail.enabled: ${MAIL_ENABLED:true}

---
spring:
config.activate.on-profile: "dev"

spring.jpa:
show-sql: true
hibernate.ddl-auto: create-drop

management.endpoints.web.exposure.include: "*"

sample.mail.enabled: false

0 comments on commit a834888

Please sign in to comment.