# java-springboot **Repository Path**: petterhe/java-springboot ## Basic Information - **Project Name**: java-springboot - **Description**: IDEA构建Maven+springboot+mybatis项目 https://blog.csdn.net/a290270915/article/details/79176859 - **Primary Language**: Java - **License**: Not specified - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2019-10-10 - **Last Updated**: 2020-12-19 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README # java-springboot #### Description IDEA构建Maven+springboot+mybatis项目 https://blog.csdn.net/a290270915/article/details/79176859 generatorConfig.properties --数据库链接配置 generator.properties --mybaits 数据库配置 主要用于代码生成等 可指定端口 server.port generatorConfig.xml --mybaits 配置 主要反射和用于代码生成等 错误说明 1、service 找不到 @SpringBootApplication @MapperScan(basePackages="com.boot.dao") //mapper 使用必须配置到dao层 service 层 和 实现层 增加 @service 注解, controller 引用时 需要加 @Autowired,service实现层 引用dao增加 @Autowired dao 层 需要加@Mapper //可以不用 Application 不行在主包下面 com.boot 2、mapper 找不到 mybatis.mapper-locations=classpath:com/boot/mapper/*Mapper.xml pom 增加 资源配置扫描 src/main/java **/*.xml **/*.properties **/*.yml **/*.html /static/ false src/main/resources **/*.xml **/*.properties **/*.yml **/*.html /static/ false 3、数据库连不上 mybatis mySql链接 useSSL=true 4、xml生成 xml 代码可能会重复生成