在java、SpringBoot中使用Generator時,我們運行Generator中的主函式方法時
明明什么都沒有做,代碼還一模一樣,但就會出現下面的這個報錯:
java.io.FileNotFoundException: E:**\target\classes\generatorConfig.xml (系統找不到指定的路徑,)
或者generatorConfig.xml (系統找不到指定的檔案,)
錯誤原文:
java.io.FileNotFoundException: E:\**\target\classes\generatorConfig.xml (系統找不到指定的路徑,)
at java.io.FileInputStream.open0(Native Method)
at java.io.FileInputStream.open(FileInputStream.java:195)
at java.io.FileInputStream.<init>(FileInputStream.java:138)
at java.io.FileReader.<init>(FileReader.java:72)
at org.mybatis.generator.config.xml.ConfigurationParser.parseConfiguration(ConfigurationParser.java:72)
at com.hwj.pjname.common.utils.GeneratorDisplay.generator(GeneratorDisplay.java:22)
at com.hwj.pjname.common.utils.GeneratorDisplay.main(GeneratorDisplay.java:33)
錯誤原因1: 檔案名或路徑不對,
首先重繪專案目錄確認以下組態檔是否在錯誤原因中指定的位置,并且檔案名正確,一般出現這種情況概率不高,
錯誤原因2: 專案路徑包含了中文,
generator不允許路徑出現中文,
哈哈,小秋熊已經看到螢屏前的你拍腦門了!
小秋熊:本文轉載需注明出處即可,
轉載請註明出處,本文鏈接:https://www.uj5u.com/houduan/238874.html
標籤:Java
上一篇:Java繼承的概念
下一篇:Java常見物件參考錯誤
