這是我手敲出來的,運行結(jié)果正常,如果你出現(xiàn)了異常,找一下自己的代碼有沒有問題,我使用的是IDEA編譯器,放在Github上面供大家參考。地址:https://github.com/toheng/seckill
2018-04-12
數(shù)據(jù)庫連接出問題的話,記得把jdbc.properties中的username="root"改成user="root"。因為spring 中在取${username}中默認會取到你目前電腦的用戶名,而不是數(shù)據(jù)庫用戶名,所以只需要將username改為user,然后取${user}就沒問題了,希望對大家有幫助。
2018-04-12
最贊回答 / 窗下有梧桐
數(shù)據(jù)庫連接出問題的話,記得把jdbc.properties中的username="root"改成user="root"。因為spring
中在取${username}中默認會取到你目前電腦的用戶名,而不是數(shù)據(jù)庫用戶名,所以只需要將username改為user,然后取${user}就沒問題了
2018-04-11
ERROR 1064 (42000): 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 ''seckill_id' bigint NOT NULL AUTO_INCREMENT COMMENT '商品庫存id',
'name' VA' at line 2 哪兒的錯啊 看了 和老師一模一樣 用的是MySQL 5.7.19
錯誤原因,把單引號去了就行了,有些版本的列名不能加單引號
'name' VA' at line 2 哪兒的錯啊 看了 和老師一模一樣 用的是MySQL 5.7.19
錯誤原因,把單引號去了就行了,有些版本的列名不能加單引號
2018-04-11
使用mybatis可以使用 我開發(fā)的intellij下的mybatis插件 能極大提升效率
https://github.com/gejun123456/MyBatisCodeHelper-Pro
java類和xml文件的互相跳轉(zhuǎn),xml文件的自動補全這些功能都是免費的。
特有的一鍵通過方法名生成sql 簡單的查詢都可以自動生成,大幅提升效率
https://github.com/gejun123456/MyBatisCodeHelper-Pro
java類和xml文件的互相跳轉(zhuǎn),xml文件的自動補全這些功能都是免費的。
特有的一鍵通過方法名生成sql 簡單的查詢都可以自動生成,大幅提升效率
2018-03-28
鏈接不上數(shù)據(jù)庫的看這里: <context:property-placeholder location="classpath:jdbc.properties" system-properties-mode="FALLBACK"/>
2018-03-27
<beans xmlns="http://www.springframework.org/schema/beans"
增加 xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
增加 http://www.springframework.org/schema/context
增加 http://www.springframework.org/schema/context/spring-context.xsd">
增加 xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="
增加 http://www.springframework.org/schema/context
增加 http://www.springframework.org/schema/context/spring-context.xsd">
2018-03-26