#springbootElement
springbootElement
InterfaceToL
the rigour of mathematics and the safety of projects
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
ssm启动“A required class was missing while executing org.apache.tomcat.maven:tomcat7-maven-plugin:2.1”
问题原因:tomcat7插件版本2.1突然失效。解决方案:tomcat7插件版本改为2.2。原创 2024-07-22 22:54:04 · 287 阅读 · 0 评论 -
ssm整合表现层和前端数据传输协议报错“HttpMessageNotWritableException: No converter found for return value of type: ”
问题原因:数据传输协议类没有set方法。解决方案:数据传输协议类添加set方法。原创 2024-07-22 02:10:15 · 234 阅读 · 0 评论 -
ssm整合在controller层用@Autowired自动装配service层对象时报错“No Beans Of ‘UserService‘ type found”
问题原因:MVC配置了类的注解@ComponentScan("com.example.controller")扫描范围问题?解决方案:项目正常启动和正常访问,暂不处理。原创 2024-07-21 23:18:45 · 167 阅读 · 0 评论 -
ssm整合单元测试报错“java.lang.IllegalStateException: No ServletContext set”
问题原因:@EnableWebMvc注解与SpringBootTest.WebEnvironment.NONE冲突导致。解决方案:注释掉@EnableWebMvc注解后即可。原创 2024-07-21 23:02:49 · 340 阅读 · 0 评论 -
springMVC启动报错“org.apache.catalina.LifecycleException: A child container failed during start”
问题原因:导入依赖没有设置<scope>如下。解决方案:导入依赖设置<scope>如下。原创 2024-07-20 01:33:16 · 339 阅读 · 0 评论 -
spring整合mybatis报错“Caused by: org.springframework.beans.factory.BeanCurrentlyInCreationException:
解决方案:去掉依赖注入或者改为依赖注入dao中的接口的实现类的bean如下。原创 2024-07-17 23:10:46 · 377 阅读 · 0 评论 -
spring aop 失效 失败 没效 不起作用
问题原因:配置类配置的包扫描为@ComponentScan(value={"com.example.dao","com.example.service"}),而aop类在com.example.aop包下,导致没扫描到。解决方案:配置类配置的包扫描改为@ComponentScan(value={"com.exampleservice"})原创 2024-07-17 01:16:07 · 296 阅读 · 0 评论 -
springboot整合rocketmq启动报错“Field rocketMQTemplate in com.example.service.impl.rocketmq.
问题原因:application.yml错误配置如下。解决方案:application.yml正确配置如下。原创 2024-07-14 11:50:38 · 1405 阅读 · 0 评论 -
springboot整合rocketmq命令窗口测试producer报错“Caused by: org.apache.rocketmq.remoting.exception.
问题原因:环境变量配置错误变量NAMESER_ADDR。解决方案:环境变量配置正确变量NAMESRV_ADDR。原创 2024-07-14 10:58:22 · 241 阅读 · 0 评论 -
springboot整合jetcache“Caused by: java.lang.IllegalStateException: Error processing condition on com.
问题原因:application.xml错误配置如下。原创 2024-07-12 10:33:01 · 475 阅读 · 0 评论 -
springboot整合jetcache启动报错“java.lang.ClassNotFoundException: redis.clients.jedis.UnifiedJedis”
问题原因:导入依赖如下。解决方案:导入依赖改为。原创 2024-07-11 22:35:37 · 332 阅读 · 0 评论 -
springboot整合cache启动时报错“Property or field ‘id‘ cannot be found on object of type ‘org.springframework
问题原因:@Cacheable(value = "usersCache",key = "id")的key没有加#解决方案:改为@Cacheable(value = "usersCache",key = "#id")原创 2024-07-10 19:58:57 · 454 阅读 · 0 评论 -
springboot启动报错“Error:Kotlin: Module was compiled with an incompatible version of Kotlin. The binary
解决方案:idea-build菜单-rebuild project。原创 2024-07-10 09:56:57 · 335 阅读 · 0 评论 -
springboot整合嵌入的H2后用jdbcTemplate进行单元测试时报错“Database may be already in use:“Locked by another process””
解决方案:命令窗口tasklist | findstr java查找占用的程序并taskkill /pid 20376 -f杀掉。问题原因:有java进程占用。原创 2024-07-09 09:50:43 · 405 阅读 · 0 评论 -
springboot整合mybatisplus报错“Caused by: org.apache.ibatis.exceptions.PersistenceException:
问题原因:启动类中使用了@Bean以及@ConfigurationProperties(prefix = "data-source")中的prefix参数和application.xml配置文件中的不一致。解决方案:注释两个注解及其相关代码或者注释掉@Bean或者修改prefix的参数和application.xml配置文件中的一致。原创 2024-07-08 00:13:16 · 492 阅读 · 0 评论 -
SpringBoot报错“java.lang.NoClassDefFoundError: org/springframework/jdbc/datasource/embedded/Embedded”
问题原因:缺少jdbc相关的jar包。解决方案:pom中添加依赖如下。原创 2024-07-06 17:51:09 · 422 阅读 · 0 评论 -
springboot依赖报错“failed to read artifact descriptor for org\springframework\spring-test\5.2.8.RELEASE”
问题原因:org\springframework\spring-test\5.2.8.RELEASE目录或其中的文件损坏。解决方案:maven仓库所在目录右键属性-工具-检查-扫描驱动器修复损坏目录或文件。原创 2024-07-06 00:11:32 · 297 阅读 · 0 评论 -
springboot打包报错“Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:3.8.1:........”
程序包com.sun.xml.internal.ws.policy.privateutil不存在”问题原因:缺少maven编译插件。解决方案:pom文件中添加如下。原创 2024-07-04 18:13:52 · 640 阅读 · 0 评论 -
springboot整合mybatis plus测试业务层方法时报错“org.apache.ibatis.binding.BindingException:
问题原因:dao层定义了public User getUserById(int id),但没有给其添加@Select注解,所以当业务层注入dao调用该接口来重写业务层的接口时没有sql语句可以执行。解决方案:getUserById(int id)方法上添加@Select注解。原创 2024-07-04 01:32:40 · 225 阅读 · 0 评论 -
springboot整合mybatis plus测试报错“Error reading file:invalid CEN header (bad signature)”
错误的类文件: /D:/WorkingSoftwareInstall/maven/scarepository/org/springframework/spring-context/6.1.10/spring-context-6.1.10.jar!继续报错:“Cause: java.sql.SQLSyntaxErrorException: Table 'xxxxxx.user' doesn't exist”问题原因:默认使用domain中的User作为sql语句中的表名。原创 2024-07-03 18:18:37 · 569 阅读 · 0 评论 -
springboot2.3.2整合mybatis测试报错“Caused by: org.springframework.beans.factory.NoSuchBeanDefinitionExcept
错误的类文件: /D:/WorkingSoftwareInstall/maven/scarepository/org/springframework/spring-context/6.0.10/spring-context-6.0.10.jar!问题原因:创建springboot工程选择的是3.3.1版本,pom文件中改为2.3.2版本(参见前贴)解决方案:pom文件中parent版本改回3.3.1版本。原创 2024-07-03 16:23:36 · 259 阅读 · 0 评论 -
springboot整合mybatis导入依赖报错“Problem:unresolved dependency:“com.mysql:mysql-connector-j:jar unknown”
问题原因:idea2019.1选择的springboot版本为3.1.1,默认导入的mysql相关依赖如下:解决方案:修改parent版本为2.3.2.RELEASE,然后再修改mysql相关依赖如下:原创 2024-07-03 15:53:33 · 460 阅读 · 1 评论 -
springboot2.3.2.RELEASE用自动装配注解封装配置文件数据时报错“Could not autowire. No beans of ‘Environment‘ type found.”
解决方案:正确导包import org.springframework.core.env.Environment。问题原因:错误导包import org.omg.CORBA.Environment。原创 2024-07-03 11:53:34 · 206 阅读 · 0 评论 -
springboot启动web项目报错“无效的目标发行版:17”
问题原因:idea的java complier配置的模块target bytecode version为17。解决方案:idea的java complier配置的模块target bytecode version改为8。原创 2024-06-30 22:53:41 · 260 阅读 · 0 评论
分享