随笔分类 -  SpringBoot

摘要:报错信息如下: *************************** APPLICATION FAILED TO START *************************** Description: Parameter 0 of constructor in com.zjxf.reposi 阅读全文
posted @ 2020-09-17 13:41 wqkeep 阅读(13223) 评论(0) 推荐(0) 编辑
摘要:异常 : Error creating bean with name 'serverEndpointExporter' defined in class path resource [com/zjxf/config/web/WebSocketConfig.class]: Invocation of 阅读全文
posted @ 2020-08-11 10:55 wqkeep 阅读(6064) 评论(0) 推荐(0) 编辑
摘要:引入: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-test</artifactId> </dependency> 选中要测试的类, Alt + Enter 出现 c 阅读全文
posted @ 2020-06-28 14:22 wqkeep 阅读(141) 评论(0) 推荐(0) 编辑
摘要:SpringBoot + SpringTask + SpringDataJPA 业务: 用户选择 自动关闭 后, 可以选择一个时间(格式为yyyy-MM-dd hh:mm),时间到后触发定时任务,关闭或开启系统(修改状态) 精确到秒倒计时会出错(未知), 所以就规定用户不能选秒, 业务逻辑也是可以的 阅读全文
posted @ 2020-06-15 15:59 wqkeep 阅读(4328) 评论(0) 推荐(0) 编辑
摘要:报错: 问题: 解决: 上下改成 8 即可解决问题. 阅读全文
posted @ 2020-06-12 18:30 wqkeep 阅读(105) 评论(0) 推荐(0) 编辑
摘要:1.在项目的application.yml配置文件中写入需要的属性 2.创建对应的配置类 3.注入到需要的类中 4.调用 阅读全文
posted @ 2020-06-10 11:19 wqkeep 阅读(473) 评论(0) 推荐(0) 编辑
摘要:解决: 注解加需要测试的class @SpringBootTest(classes = StudentInfoServiceImpl.class) @RunWith(SpringRunner.class) 阅读全文
posted @ 2020-06-04 13:38 wqkeep 阅读(7452) 评论(0) 推荐(1) 编辑
摘要:转自 : https://www.jianshu.com/p/ce35092e89d2 https://www.jianshu.com/p/24444f1d784e 阅读全文
posted @ 2020-06-02 16:02 wqkeep 阅读(398) 评论(0) 推荐(0) 编辑
摘要:转自 https://blog.csdn.net/flyingnet/article/details/78009254 阅读全文
posted @ 2020-04-16 13:16 wqkeep 阅读(1498) 评论(0) 推荐(0) 编辑
摘要:解决 原因:由于Feign底层使用Ribbon调用请求,ribbon的默认超时时间为1s,所以超过1s就报错 在search搜索微服务的application.yml配置文件中添加ribbon的超时配置,我配置了5秒还是报错,于是我改成了50秒,OK成功! 阅读全文
posted @ 2020-03-27 11:35 wqkeep 阅读(1626) 评论(0) 推荐(0) 编辑
摘要:乐优商城项目,搜索微服务:在导入数据时,报错。 猜想, 既然报的是404 肯定是path有问题 所有出现问题的地方有可能是@RequestMapping@service@controller等没有加,但我反复确认过,发现都没有问题,再三确认过代码没问题后,便去寻找是否之前做测试插入数据库时没有编写完 阅读全文
posted @ 2020-03-27 09:12 wqkeep 阅读(3107) 评论(0) 推荐(1) 编辑
摘要:异常: 容器中找不到bean 解决: 要注意,我们并没有在mapper接口上声明@Mapper注解,那么mybatis如何才能找到接口呢? 我们在启动类上添加一个扫描包功能:引入通用mapper的包。即可解决。 阅读全文
posted @ 2020-03-19 11:40 wqkeep 阅读(3712) 评论(0) 推荐(0) 编辑
摘要:运用spring cloud框架基于spring boot构建微服务,一般需要启动多个应用程序,在idea开发工具中,多个同时启动的应用 需要在RunDashboard运行仪表盘中可以更好的管理,但有时候idea中的RunDashboard窗口没有显示出来,也找不到直接的开启按钮 idea中打开Ru 阅读全文
posted @ 2019-04-03 22:02 wqkeep 阅读(2468) 评论(0) 推荐(0) 编辑
摘要:@Controller和@RestController的区别? 官方文档:@RestController is a stereotype annotation that combines @ResponseBody and @Controller.意思是:@RestController注解相当于@R 阅读全文
posted @ 2019-04-01 12:17 wqkeep 阅读(107) 评论(0) 推荐(0) 编辑
摘要:@RequestMapping 和 @GetMapping @PostMapping 区别 @GetMapping是一个组合注解,是@RequestMapping(method = RequestMethod.GET)的缩写。 @PostMapping是一个组合注解,是@RequestMapping 阅读全文
posted @ 2019-04-01 12:16 wqkeep 阅读(202) 评论(0) 推荐(0) 编辑