#2021.01.12
done:
- 微服务搭架子,eureka、zuul
- user模块简单实现了个demo
今日份bug
- IDEA用maven进行import报错Auto build completed with errors
repository
依赖下载下来了,external liberaries
却没有依赖 Solution:后来发现是因为放在里,删掉解决 - 子模块引入依赖继承父模块版本时,还要嵌套
- mapper没有注入
No MyBatis mapper was found in '[com.phonestore.user]' package. Please check your configuration.
Solution:tk.mapper
和Mapper
依赖不能都导入,因为tk.mapper
内置了mapper
依赖
<!-- mybatis启动器 -->
<!-- <dependency>-->
<!-- <groupId>org.mybatis.spring.boot</groupId>-->
<!-- <artifactId>mybatis-spring-boot-starter</artifactId>-->
<!-- </dependency>-->
<!-- 通用Mapper启动器 -->
<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId>
</dependency>