
springboot
卡梅丽多
但愿人长久,千里共婵娟
展开
-
SpringBoot在Thread线程中注入Bean无效的解决方式
作者:hayaqi0504来源:优快云原文:https://blog.youkuaiyun.com/hayaqi0504/article/details/85233804------------------------------------------------------------------------------------------------------------------...转载 2019-01-12 09:47:01 · 3041 阅读 · 0 评论 -
将Component 注入新线程并自动运行
1.创建一个带线程内部类的组件@Componentpublic class AccountQueueThread { @Autowired private SomeFeignClient someFeignClient; @Autowired private SomeService someService; public void execut...原创 2019-01-12 10:22:47 · 2326 阅读 · 1 评论 -
IDEA+Spring Cloud+Maven模块化项目打包
背景:采用Spring Cloud框架搭建了一个项目,里面包含多个微服务,其中项目A依赖项目B,项目B里面是公共类(model、utils等)。1.B项目pom不能引入spring-boot-maven-plugin插件<build> <plugins> <plugin> <groupId>org.springframewo...原创 2019-01-13 21:57:00 · 3730 阅读 · 1 评论 -
springboot图片显示
#资源映射路径为/image/**,url访问的请求路径spring: mvc: tatic-path-pattern: /image/**#资源映射地址为file:D://User/,图片存放的真实路径spring: resources: static-locations: file:D://User/ 通过路径即可访问图片http:/...原创 2019-01-14 13:44:47 · 6753 阅读 · 1 评论 -
springboot上传文件法获取文件路径问题
问题描述:在开发一个springboot的项目时,在项目部署的时候遇到一个问题:就是我将项目导出为jar包,然后用java -jar 运行时,项目中文件上传的功能无法正常运行,其中获取到存放文件的目录的绝对路径的值为空,文件无法上传解决方案://获取跟目录File path = new File(ResourceUtils.getURL("classpath:").getPat...转载 2019-02-23 10:45:57 · 10399 阅读 · 0 评论 -
Springboot + freemarker 修改ftl文件后动态刷新
修改.ftl 文件保存后我怎么感觉比重启还要慢原创 2019-03-02 10:33:48 · 6902 阅读 · 0 评论