Hi we got a spring application running on tomcat application-server. I want to add integration tests with Springboot in JUnit. I now got the problem that the embedded tomcat
Spring Boot offer many ways to externalize your configuration...
You can define your datasource properties in your tomcat/conf/Catalina/
context descriptors.
You could define your jndi name:
Or define the datasource:
Even define the path to an application.properties
and set here your configuration:
This way is not necessary set programmatically your hardcoded datasource and you can put another database configuration for testing in src/test/resources/application.properties
:
spring.datasource.url=
spring.datasource.username=
spring.datasource.password=