我是按老师课程来弄的,但是配置tomcat的时候,找不到artifacts。报404.然后根据文档弄好了之后就多了一个web文件和SRC文件平级的。
然后我配置pom.xml的时候是照搬的老师的,只是把下图的配置路径从之前webapp目录下,改到了web目录下,如下图所示
generatorConfig.xml复制老师的,
错误日志是:
Failed to execute goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate (default-cli) on project mmall: Execution default-cli of goal org.mybatis.generator:mybatis-generator-maven-plugin:1.3.2:generate failed: Cannot resolve classpath entry: /Users/looker/.m2/repository/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar -> [Help 1]
datasource.properties文件是下面
db.driverLocation=/Users/looker/.m2/repository/mysql/mysql-connector-java/5.1.6/mysql-connector-java-5.1.6.jar
db.driverClassName=com.mysql.jdbc.Driver
db.url=jdbc:mysql://182.92.82.103:3306/mmall_learning?characterEncoding=utf-8
db.username=mmall
db.password=mmallpassword