用mybatis-plus自动生成代码,在主启动类进行启动时,可能会遇到如下报错:
org.springframework.boot.context.logging.ClasspathLoggingApplicationListener - Application failed to start with classpath:
中文翻译就是:应用程序无法使用类路径启动
org.springframework.boot.SpringApplication - Application run failed
中文翻译就是:应用程序运行失败
以上错误就是在Mpom.xml里依赖的架包版本问题,正确的应该要导入如下架包:
<!--mybatis自动生成代码所需架包依赖--> <dependency> <groupId>com.baomidou</groupId> <artifactId>mybatis-plus-generator</artifactId> <version>3.4.1</version> </dependency> <!--mybatis自动生成代码所需架包依赖--> <dependency> <groupId>org.freemarker</groupId> <artifactId>freemarker</artifactId> </dependency>
导入这两个架包就不会报错了!