202309301820_《Spring boot項目,繼承mybatis-generator遇到的問題及解決》

 當配置到最後,雙擊右側maven tab,準備生成時,報紅:

1. “Loading class `com.mysql.jdbc.Driver'. This is deprecated. The new driver class is `com.mysql.cj.jdbc.Driver'. The driver is automatically registered via the SPI and manual loading of the driver class is generally unnecessary.”

解決: mysql版本問題。高版本需cj, 低版本不需要cj。 我的5.7版本,去掉了cj。

  但是改回之後還是紅。

解決: 將pom.xml的connector改回地版本。我的版本選擇:5.1.6 。

 

2. “Column 'IS_GENERATEDCOLUMN' not found.”

解決: 在pom.xml, 將‘mybatis-genrator’插件從1.3.x升級至“1.4.0”.

 

3 .“The specified target project directory src\main\java does not exist”

解決: 因爲Mac系統 “/”不用“\”!!! 將mybatisGenerator.xml文件裏涉路徑的改回就行。

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章