使用springboot加逆向工程genertor注意如果生成多次需要删除原来的mapper.xml 否则会重复 无法注入而且提示 not found bean....

    技术2022-07-13  82

    1.在dao上@Mapper与 run()主程序@MapperScan注解是等同的,dao 和mappexml的文件位置也需要配置好

    spring.datasource.url = jdbc:mysql://localhost:3306/menhu?useUnicode=true&characterEncoding=utf8&serverTimezone=GMT%2B8 spring.datasource.username = root spring.datasource.password = 123456 spring.datasource.driverClassName = com.mysql.cj.jdbc.Driver spring.datasource.max-active=20 spring.datasource.max-idle=8 spring.datasource.min-idle=8 spring.datasource.initial-size=10 logging.level.org.springframework.web=DEBUG spring.datasource.type=com.alibaba.druid.pool.DruidDataSource mybatis.mapper-locations=mybatis/mapper/*xml mybatis.type-aliases-package=com.lixwucs.muhu.bean
    Processed: 0.055, SQL: 9