-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Change Spring Boot default application.properties to be generated in root directory #114
Comments
Yeah, I've struggled with this one a bit for that exact reason. I'll have to try this out, but... what about something like this: https://docs.spring.io/spring-boot/docs/current/reference/html/spring-boot-features.html#boot-features-external-config-files-importing
spring.config.import=optional:file:./okta-secrets.properties # or a better name here This should allow env vars to take precedence as well |
The |
Doh, that would explain why I hadn't heard of it before... Another option might be to try something like this and create a But I might be overthinking it, and maybe just stick it in the root dir, along with a comment in the header of the file:
|
FWIW, I'm in the process of changing the sample that's generated with |
Currently, when you create a Spring Boot App with the Okta CLI (using Spring Security or the Okta Spring Boot Starter), it adds all your configuration to
src/main/resources/application.properties
. This isn't great because people often have non-sensitive configuration information in this file and they'll likely want to check it in.I think it's better to generate
application.properties
in the root directory. This will file will still be read when you start the app, and it's unlikely people will check it in by mistake.The text was updated successfully, but these errors were encountered: