spring
坚强一点
这个作者很懒,什么都没留下…
展开
-
spring boot 报错 Error creating bean with name 'indexController': Injection of autowired dependencies
Spring boot 报错 无法找到匹配的bean 所以无法注入,并且不是忘记增加注解,或配置,配置的名称 类型也没有错。最后的解决方法 很简单只是挪一下启动类的位置就能搞定原创 2017-06-28 09:05:46 · 20152 阅读 · 2 评论 -
spring cloud config server 配置中心
spring cloud config 配置中心配置中心分为 server 服务端 client 和客户端, 服务端搭建pom.xml <?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi...原创 2017-08-21 11:44:44 · 811 阅读 · 0 评论 -
spring boot maven 报错 sconnected from the target VM, address: '127.0.0.1:57472', transport: 'socket'
spring boot maven web项目启动 报错 sconnected from the target VM, address: '127.0.0.1:57472', transport: 'socket' idea 直接运行 springbootAplication 启动类,无法启动web项目,也没有什么具体的报错信息。百度后 有说 是因为这个项目已经启动了,但是因意外关闭导...原创 2017-10-09 10:40:23 · 19724 阅读 · 3 评论 -
spring boot 下载文件出错 org.apache.http.ConnectionClosedException: Premature end of Content-Length delimi
下载一个大文件(100M左右)报错,org.apache.http.ConnectionClosedException: Premature end of Content-Length delimited message body (expected: 103767; received: 95040百度 google 了很久尝试了很多办法,比如增加 http 链接的超时时间,增加缓冲区等都...原创 2018-05-16 10:32:35 · 23667 阅读 · 1 评论 -
Spring Boot 异步任务 @EnableAsync 和 @Async
强大的 spring boot 已经帮忙封装了线程池执行异步任务。再也不用自己写线程池了。以前如果需要执行异步任务,需要自己封装一个线程池,然后吧任务提交到线程池执行。在 spring boot 中已经封装了改工具,只需要直接启用就可以了。1、在启动类上增加 @EnableAsync 注解,开启异步任务。2、在需要异步执行的方法上增加 @Async 注解,标识为一...原创 2019-03-13 16:18:08 · 1409 阅读 · 0 评论