An error message occurred when unit testing the DAO layer: Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is java.sql.SQLSyntaxErrorException: Unknown database 'blue'
I have never been able to figure out where the blue database came from. Later, I conducted a keyword search on the project and found that in the application.properties file
Database connection address
spring.datasource.url=jdbc:mysql://localhost:3306/blue?serverTimezone=The house in UTC is written as blue (face covering). After the change, it runs normally. . So when copying other codes, you must pay attention to these details, otherwise it will become a sea of bugs that will take you a whole day to adjust. . .