随笔分类 - springboot
摘要:https://blog.csdn.net/weixin_45131680/article/details/131561407
阅读全文
摘要:原贴:https://blog.csdn.net/wangchengaihuiming/article/details/95313482 package lct.conference.util; import com.imon.util.Encode; import org.dom4j.Docume
阅读全文
摘要:<build> <plugins> <plugin> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-maven-plugin</artifactId> <version>2.3.0.RELEASE</versi
阅读全文
摘要:原因分析见:https://www.cnblogs.com/pjjlt/p/10926398.html 解决办法:catch中手动回滚。 try { }catch (Exception e){ //手动回滚 TransactionAspectSupport.currentTransactionSta
阅读全文
摘要:https://www.cnblogs.com/winner-0715/p/10076832.html
阅读全文
摘要:https://www.jianshu.com/p/2a9b78e07d52
阅读全文
摘要:@RestController注解,相当于@Controller+@ResponseBody两个注解的结合,返回json数据不需要在方法前面加@ResponseBody注解了,但使用@RestController这个注解,就不能返回jsp,html页面,视图解析器无法解析jsp,html页面。
阅读全文
摘要:@SpringBootApplication包含的三个注解及其含义 第一个:@SpringBootConfiguration(在这个类的源码中又有一个Configuration的注解) @Configuration这个注解的作用就是声明当前类是一个配置类,然后Spring会自动扫描到添加了@Conf
阅读全文
摘要:<springProperty scope="context" name="logName" source="dubbo.application.name" defaultValue="default"/> <property name="log.path" value="${catalina.ba
阅读全文
摘要:问题:前端vue+axios,后台springboot2.3+spring-session,为了解决跨域问题,前端已经设置了 axios.defaults.withCredentials = true; 后台也加了注解 @CrossOrigin(origins = "*", maxAge = 360
阅读全文
摘要:TransactionAspectSupport.currentTransactionStatus().setRollbackOnly();
阅读全文
摘要:springboot拦截器导致@CrossOrigin失效。 原因: 1、CROS复杂请求时会首先发送一个OPTIONS请求做嗅探,来测试服务器是否支持本次请求,请求成功后才会发送真实的请求;而OPTIONS请求不会携带数据,导致这个请求被拦截了,直接返回了状态码,响应头中没携带解决跨域问题的头部信
阅读全文
摘要:前端: axios.defaults.withCredentials = true; 后台: @CrossOrigin(origins = "*", maxAge = 3600,allowCredentials="true")
阅读全文
摘要:webUrls: gray: 192.168.0.48:8123,192.168.0.49:8123 prod: 192.168.0.50:8123,192.168.0.51:8123 @Value("${webUrls.gray}") private String[] grayUrls; @Val
阅读全文
摘要:package com.xxxxx.config.intercepters; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servl
阅读全文
摘要:package com.xxxxx.utils; import lombok.extern.slf4j.Slf4j; import org.apache.dubbo.config.ApplicationConfig; import org.apache.dubbo.config.ReferenceC
阅读全文
摘要:使用@ModelAttribute注解的实体类接收前端发来的数据格式需要为"x-www-form-urlencoded", @RequestBody注解的实体类接收前端的数据格式为JSON(application/json)格式。 (若是使用@ModelAttribute接收application/
阅读全文
摘要:切面打印日志时,参数序列化异常异常信息:java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyn
阅读全文
摘要:当yml文件过长想根据业务划分的话,可以用以下配置, 引入拆分出去的配置文件 spring: profiles: include:filename 子配置文件名为application-filename.yml 补充多个子文件: spring: profiles: include: - filena
阅读全文
摘要:解决方法: 加一个参数: serverTimezone=UTC jdbc:mysql://127.0.0.1:3306/springboot-dubbo01?useUnicode=true&characterEncoding=UTF-8&autoReconnect=true&failOverRead
阅读全文

浙公网安备 33010602011771号