就是因为没有对应的依赖

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>

加上对应依赖就好了

相关文章:

  • 2022-12-23
  • 1970-01-01
  • 2021-05-13
  • 2022-12-23
  • 2022-12-23
  • 2021-08-07
  • 2022-01-20
  • 2021-08-25
猜你喜欢
  • 2022-12-23
  • 2021-11-04
  • 2022-12-23
  • 2021-05-18
  • 2021-07-23
  • 2021-07-17
  • 2022-12-23
相关资源
相似解决方案