2019-01-19 17:56:31.762? INFO 8904 --- [nio-8090-exec-2] com.alibaba.druid.pool.DruidDataSource? ?: {dataSource-1} inited
2019-01-19 17:56:32.212? INFO 8904 --- [nio-8090-exec-2] o.s.b.f.xml.XmlBeanDefinitionReader? ? ? : Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
### Error updating database.? Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
### The error may involve com.miaoshaproject.dao.UserPasswordDOMapper.insertSelective-Inline
### The error occurred while setting parameters
### SQL: insert into user_password
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
2019-01-23
把你的郵箱發(fā)我,我可以把整個項目的代碼都給你。mybatis-generator.xml和application.properties文件同時位于resources的根目錄下面
2019-01-19
應該是你的mapper.xml文件有問題。mybatis-generator.xml是mybatis生成的配置文件,位于resources目錄下面。
2019-01-19
2019-01-19 17:56:31.762? INFO 8904 --- [nio-8090-exec-2] com.alibaba.druid.pool.DruidDataSource? ?: {dataSource-1} inited
2019-01-19 17:56:32.212? INFO 8904 --- [nio-8090-exec-2] o.s.b.f.xml.XmlBeanDefinitionReader? ? ? : Loading XML bean definitions from class path resource [org/springframework/jdbc/support/sql-error-codes.xml]
2019-01-19 17:56:32.395? WARN 8904 --- [nio-8090-exec-2] .m.m.a.ExceptionHandlerExceptionResolver : Resolved [org.springframework.jdbc.BadSqlGrammarException:?
### Error updating database.? Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
### The error may involve com.miaoshaproject.dao.UserPasswordDOMapper.insertSelective-Inline
### The error occurred while setting parameters
### SQL: insert into user_password
### Cause: com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1
; bad SQL grammar []; nested exception is com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '' at line 1]
2019-01-19
看你的mybatis-generator里面設置sqlMapGenerator了沒有。
然后,再看application.properties里面設置了mybatis.mapper-locations了沒有。
啟動的應用程序需要加上下面兩個注解。里面的包名換成你自己實際對應的包名。
2019-01-19
這個沒關系~只要運行沒問題就行。