Springboot start does not check the data source configuration JPA

1. Problem

Sometimes we use spring boot, configuration dependent spring data jpa in dependence, it will automatically detect the source of the configuration data at this time when spring boot start, if not then reported no errors in the data source.
But this dependence must be because the code need to choose whether to enable a data source based on some conditions, then what to do?

2. Program

Arranged to set the following examples in SpringApplication:

spring.autoconfigure.exclude = org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration,org.springframework.boot.autoconfigure.orm.jpa.HibernateJpaAutoConfiguration

Examples are as follows:
Here Insert Picture Description

3. References

Published 418 original articles · won praise 745 · Views 1.26 million +

Guess you like

Origin blog.csdn.net/u013467442/article/details/90757853