老师 sqlserver数据库, datasource.properties配置运行错误问题?
来源:5-9 mybatis三剑客之mybatis-generator配置
慕仔2492911
2019-10-06
jar:
pom.xml
datasource.properties里的配置
db.driverLocation=E:/newpro/mmall/src/libs/sqljdbc4-4.0.jar
db.driverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
db.url=jdbc:sqlserver://127.0.0.1:1433;DatabaseName=bookstore
db.username=mmall
db.password=mmallpassword
运行错误:
E:\jdk\bin\java.exe -Dmaven.home=E:\maven\apache-maven-3.0.5 -Dclassworlds.conf=E:\maven\apache-maven-3.0.5\bin\m2.conf “-javaagent:F:\IntelliJ IDEA 2018.3.6\lib\idea_rt.jar=60023:F:\IntelliJ IDEA 2018.3.6\bin” -Dfile.encoding=UTF-8 -classpath E:\maven\apache-maven-3.0.5\boot\plexus-classworlds-2.4.jar org.codehaus.classworlds.Launcher -Didea.version=2018.3.6 -s “D:\Program Files\apache-maven-3.6.2\conf\settings.xml” -Dmaven.repo.local=D:\maven_repository org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate
[INFO] Scanning for projects…
[WARNING]
[WARNING] Some problems were encountered while building the effective model for com:mmall:war:1.0-SNAPSHOT
[WARNING] ‘dependencies.dependency.systemPath’ for com.microsoft.sqlserver:sqljdbc4:jar should use a variable instead of a hard-coded path E:/newpro/mmall/src/libs/sqljdbc4-4.0.jar @ line 259, column 23
[WARNING] ‘build.plugins.plugin.version’ for org.apache.maven.plugins:maven-compiler-plugin is missing. @ line 282, column 15
[WARNING]
[WARNING] It is highly recommended to fix these problems because they threaten the stability of your build.
[WARNING]
[WARNING] For this reason, future Maven versions might no longer support building such malformed projects.
[WARNING]
[INFO]
[INFO] ------------------------------------------------------------------------
[INFO] Building mmall Maven Webapp 1.0-SNAPSHOT
[INFO] ------------------------------------------------------------------------
[INFO]
[INFO] — mybatis-generator-maven-plugin:1.3.2:generate (default-cli) @ mmall —
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 0.979s
[INFO] Finished at: Sun Oct 06 11:45:57 CST 2019
[INFO] Final Memory: 6M/108M
[INFO] ------------------------------------------------------------------------
[ERROR] Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project mmall: configfile E:\newpro\mmall\src\main\resources\generatorConfig.xml does not exist -> [Help 1]
[ERROR]
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR]
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/MojoExecutionException
Process finished with exit code 1
老师 这是哪里错了啊?
1回答
-
E:\newpro\mmall\src\main\resources\generatorConfig.xml does not exist
这是说你指定的这个路径不存在。
00
相似问题