0

In my application properties i 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 to access this hibernate and database from outside the application after creating the jar. Is it possible or will spring boot will take care of it?

DreamTeK
  • 32,537
  • 27
  • 112
  • 171

1 Answers1

0

You can put application.properties file in the same directory as the Spring Boot app jar file.

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

For more solutions here's similar question: Spring boot external application.properties

Rafal
  • 459
  • 12
  • 22