这是错误消息。
2020-06-15 13:10:23.623 ERROR 37317 --- [nio-8887-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.ibatis.exceptions.PersistenceException:
### Error updating database. Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-200]
### The error may exist in tech/bootcamp/community/mapper/UserMapper.java (best guess)
### The error may involve tech.bootcamp.community.mapper.UserMapper.insert
### The error occurred while executing an update
### Cause: org.springframework.jdbc.CannotGetJdbcConnectionException: Failed to obtain JDBC Connection; nested exception is org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-200]] with root cause
org.h2.jdbc.JdbcSQLInvalidAuthorizationSpecException: Wrong user name or password [28000-200]
at tech.bootcamp.community.controller.AuthorizeController.callback(AuthorizeController.java:52) ~[classes/:na]
@Autowired
private UserMapper userMapper;
Run Code Online (Sandbox Code Playgroud)
它说这一行导致了错误。
userMapper.insert(user);
Run Code Online (Sandbox Code Playgroud)
那么用户名和密码到底是什么?
您可以设置application.properties:
spring.datasource.username=dbuser
spring.datasource.password=dbpass
Run Code Online (Sandbox Code Playgroud)
如果未明确设置,则使用默认值“sa”和“”。
| 归档时间: |
|
| 查看次数: |
15621 次 |
| 最近记录: |