Unknown property 'mybatis-plus' yml文件报错
就是因为没有对应的依赖
package com.taotao.config; import org.mybatis.spring.annotation.MapperScan; import org.springframework.boot.SpringApplication; import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.context.annotation.ComponentScan; //springboot项目唯一入口配置 @SpringBootApplication //扫描整个com.zjdfwl.mall包 @ComponentScan(basePackages = "com.taotao") @MapperScan( "com.taotao.mapper") public class Application { public static void main(String[] args) { System.out.println("zouzhele"); SpringApplication.run(Application.class, args); } }
<!-- mybatis-plus--> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-boot-starter</artifactId> <version>2.3</version> </dependency> <!-- 代码生成器默认使用如下模版引擎 --> <dependency> <groupId>org.apache.velocity</groupId> <artifactId>velocity-engine-core</artifactId> <version>2.0</version> </dependency>
加上对应依赖就好了