sql - How to configure the database and hibernate configurations in application properties file outside the spring boot application -




in application properties have:

spring.datasource.url=jdbc:sqlserver://localhost:1433;databasename=recipe spring.datasource.username=sa spring.datasource.password=merck123! spring.datasource.driverclassname=com.microsoft.sqlserver.jdbc.sqlserverdriver spring.jpa.show-sql=true spring.jpa.hibernate.dialect=org.hibernate.dialect.sqlserver2012dialect spring.jpa.properties.hibernate.dialect = org.hibernate.dialect.sqlserver2012dialect spring.jpa.hibernate.ddl-auto = update spring.jpa.hibernate.entitymanager.packagestoscan:com 

i want access hibernate , database outside application after creating jar. possible or spring boot take care of it?

you can put application.properties file in same directory spring boot app jar file.

or while running .jar app can specify location of config file in command line, like: --spring.config.location=/your/path

for more solutions here's similar question: spring boot external application.properties





wiki

Comments

Popular posts from this blog

Asterisk AGI Python Script to Dialplan does not work -

python - Read npy file directly from S3 StreamingBody -

kotlin - Out-projected type in generic interface prohibits the use of metod with generic parameter -