Springboot
旋律Melody
全栈开发。
展开
-
Springboot 使用 CaffeineCache 的 @Cacheable EL表达式中引入注入的 bean 方法定义KEY
@Cacheable keyuseannotationbeaninSpring调用Sping容器中的bean的中的方法在@Cacheable的 EL表达式中;@Servicepublic class GenerateKey { public String getKey(){ return "key"; }}@Servicepublic class CacheUtilsService {//使用public 修饰符 @Aut...原创 2020-08-04 23:07:26 · 1482 阅读 · 0 评论 -
Spring boot + Spring security 跨域鉴权失败却报跨域问题。
问题场景:Spring boot + Spring security 跨域鉴权失败当我重写AuthenticationEntryPoint 的 commence方法,@Componentpublic class CustomAuthExceptionEntryPoint implements AuthenticationEntryPoint { @Override public void commence(HttpServletRequest request, HttpS...原创 2020-06-14 09:14:31 · 940 阅读 · 4 评论 -
关于idea搭建SpringBoot启动时:Process finished with exit code 0解决办法
使用idea(springboot initializr)快速搭建springboot项目,一路next;启动时候:Process finished with exit code 0,这不是错;意思是:这个表示程序正常执行完毕退出了。这就表示项目启动成功后了,此时运行,最后运行完毕自动退出。而现在我们想要的是启动项目访问路径,我们需要的是springmvc的框架(可以使用一些注解如:@RestCo...原创 2018-07-10 10:42:46 · 56562 阅读 · 3 评论 -
docker部署springboot项目出现java.io.FileNotFoundException: /xxxx/ xxxx(No such file or directory)
环境阿里云的centos部署的springboot项目,采用maven打的jar包。项目中设计文件的上传和下载,所以会有对于文件路径的处理,但是在下载文件的时候一直会出现java.io.FileNotFoundException: /xxxx/ xxxx(No such file or directory)这个错误,一开始查实权限的问题,后来就给权限,结果也不是,后来排除发现是对于设置的...原创 2019-03-17 21:07:14 · 6328 阅读 · 0 评论