Error Reason: Spring Boot defaults to loading the Org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration class, and the Datasourceautoconfiguration class uses the The @Configuration annotation injects the DataSource bean into spring. Because there is no configuration information related to datasource in the project, the spring creation DataSource Bean will be error-free due to lack of relevant information.
Workaround:
1. Add @enableautoconfiguration (Exclude={datasourceautoconfiguration.class}) to the application class to block the spring Boot auto-inject datasource bean
2. Increase database configuration related information
Springboot's Freemarker:
Create the Springboot project and add the Freemarker jar package to the POM
Write the relevant code in the controller layer and upload the information to the specified. ftl file,
Get the information out of the. FTL
Start, run normally!
Spring Boot error: Cannot determine embedded database driver class for database type NONE