- 博客(6)
- 收藏
- 关注
原创 SpringBoot程序包不存在问题
idea页面如下图所示,找到File | Settings | Build, Execution, Deployment | Build Tools | Maven | Runner,Delegate IDE build/run actions to Maven默认不会勾选,在这里我们勾选上之后,点击Apply,问题解决。Error:(3, 32) java: 程序包org.springframework.boot不存在。
2024-04-08 21:15:51 309
原创 idea运行tomcat页面加载过慢
首先在加载其他没有连接数据库的页面时加载速度正常,并且代码体量很小,所以可能是数据库连接池的问题,需要检查连接池的相关参数。经查阅发现在spring-dao.xml中配置的C3P0数据库连接池的maxIdleTime参数数值过大(原来为300),在我将其修改为30后,问题解决,页面加载恢复正常速度。
2024-04-05 16:03:44 361 1
原创 DispatcherServlet没有为.HttpController找到一个合适的HandlerAdapter
意思是javax.servlet.ServletException异常指出Spring MVC的DispatcherServlet没有为com.langsin.controller.HttpController找到一个合适的HandlerAdapter。HandlerAdapter在Spring MVC中负责调用处理请求的具体handler方法。配置annotation-driven注解驱动,去代替注解的处理器映射器、适配器类。在配置的.xml文件中加入一行。
2024-04-04 08:00:00 323 1
原创 Could not autowire.No beans of ‘UserMapper‘ type found
因为 @Mapper 注解是 Mybatis 的,而 @Autowried 注解是 Spring 的。@Autowried 默认要求依赖对象必须存在@Autowired(required = true),所以我们修改。userMapper标红No beans of 'UserMapper' type found。检查完第二个问题后,没有发现问题,那就是idea的问题,在UserServiceImpl中。
2024-04-03 18:25:18 161 1
原创 No Getter
在练习MyBatis延迟加载时报错:Cause: org.apache.ibatis.reflection.ReflectionException: There is no getter for property named 'orderList' in 'class com.langsin.bean.UserVO'2、检查 MyBatis 的映射xml文件,确保在 标签中引用的属性名与 Java 类中的 getter 方法名匹配。
2024-04-03 17:23:18 99 1
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人