1,springboot中使用mybatis时,最好将dao接口和xml放同一个包下面,不然可能报错Invalid bound statement not found,错误指向xml中某个方法
2,配置文件yml中mybatis配置如下:mapper不要在此配置,在应用入口使用@MapperScan()去扫描问题1中的包,不然可能报错重复了
mybatis:
config-location: classpath:config/mybatis-config.xml
type-aliases-package: com.cl.model
3,模板引擎报错Error resolving template template might not exist or might not be accessible这个错误在我这里是由于spring的版本引起的,我调低版本后得到解决
4,thymeleaf模板下路径带变量的写法:th:href="@{'/first/'+${pathVariable}}"这个在分页的时候可以用到。