啟動(dòng)成功以后點(diǎn)擊登錄接口報(bào)錯(cuò)
程序里的報(bào)錯(cuò):
com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
點(diǎn)擊登錄接口后網(wǎng)頁(yè)里的報(bào)錯(cuò):
Whitelabel Error Page
This application has no explicit mapping for /error, so you are seeing this as a fallback.
Wed Apr 06 22:24:48 EDT 2022
There was an unexpected error (type=Internal Server Error, status=500).
nested exception is org.apache.ibatis.exceptions.PersistenceException: ### Error querying database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up. ### The error may exist in file [C:\Users\njlsh\IdeaProjects\IDEA demo project\target\classes\mapper\UserMapper.xml] ### The error may involve com.imooc.demo.mapper.UserMapper.findByLoginName ### The error occurred while executing a query ### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLNonTransientConnectionException: Could not create connection to database server. Attempted reconnect 3 times. Giving up.
2022-04-25
連接數(shù)據(jù)庫(kù)那錯(cuò)了