springboot
文章平均质量分 53
springboot相关的问题记录及配置等等
冷冷的菜哥
一个很懒的程序猿
展开
-
springboot2中jackson设置的LocalDateTime全局序列化不生效的问题存在情况
比如,你可能设置了如下的配置,获取其他的方式 @Configurationpublic class WebMvcConfig { @Bean public Converter<String, LocalDate> localDateConverter() { return new Converter<String, LocalDate>() { @Override public LocalDat原创 2021-05-04 13:32:34 · 3349 阅读 · 2 评论 -
postman中springboot上传文件Missing initial multi part boundary
如果在postman中设置了Context-type为multipart/form-data以及file设置,如下图:而我的调用的上传方法仅仅只是用了@RequestMapping("/xxxx"),并且使用MutipartFile,如下图:的时候,可能遇到的错误信息如下(报错信息看加粗与下划线部分就行了)org.springframework.web.multipart.MultipartException: Failed to parse multipart se...原创 2020-11-14 17:40:59 · 4888 阅读 · 0 评论 -
SpringBoot集成javafx在TableView使用Pagination分页及自定义分页,表格行编辑及弹窗编辑,全选/反选,删除与批量删除
springboot管理javafx,实现TableView的分页查询,编辑以及删除(批量删除),查询使用mybatis,分页使用PageHelper,这里只是为了结合分页插件以及自定义分页查询使用(可自行更换为其他orm组件,比如mybatis-plus,jpa等方式),该demo仅仅只是个人学习使用,如需参考还请自行验证测试,如有建议或发现错误,欢迎转载留言及指正原创 2022-05-26 09:58:26 · 2543 阅读 · 9 评论 -
springboot2.x分别使用freemarker,thymeleaf,velocity发送邮件(包括带附件的)到qq邮箱
1.首先,需要在引入mail,freemarker,thymeleaf,velocity等相关的jar包。 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-mail</artifactId> <version>2.2.原创 2020-06-25 09:29:58 · 1557 阅读 · 2 评论 -
ResourceServerConfigurerAdapter与WebSecurityConfigurerAdapter同时使用只有ResourceServerConfigurerAdapter生效
1.此处使用的ResourceServerConfigurerAdapter是spring-security-oauth2中的,WebSecurityConfigurerAdapter是spring-security-config中的;2.同时使用上面的两种配置的时候,如果两者配种存在重写相同的方法时,后者的会出现配置不生效的问题,比如重写了configure这个方法(参数final不影响)3.造成这个问题的主要原因其实就是因为两者的默认自动注册的@Order的优先级不同(具体情况请自行参考源码原创 2021-03-05 14:05:46 · 6284 阅读 · 0 评论 -
springboot2.x中的java mail使用相关模板,发送带静态资源与附件邮件到163邮箱
1.163邮箱配置省略部分其他getter与setter方法2.发送邮件的interface3.发送邮件的接口实现类import com.springcloud.my.config.MailFor163Config;import com.springcloud.my.service.MailSendTo163Service;import com.springcloud.my.utils.ContentTypeEnum;import com.springcloud.my.uti原创 2020-06-26 06:45:36 · 1577 阅读 · 0 评论 -
springboot使用juit测试出现Application run failed Error creating bean with name ‘webSocketConfig‘
springboot使用junit测试存在websocket配置问题原创 2022-03-16 11:20:04 · 1119 阅读 · 0 评论