随笔分类 -  springmvc

摘要:String conferName = new RequestContext(request).getMessage("base.conference.name"); 阅读全文
posted @ 2021-01-12 16:36 小泉哥 阅读(134) 评论(0) 推荐(0)
摘要:1、jsp文件引入 <script type="text/javascript"> var i18n=new Object(); i18n['day']='<spring:message code="homePage.day"/>'; i18n['week']='<spring:message co 阅读全文
posted @ 2020-12-15 16:45 小泉哥 阅读(341) 评论(0) 推荐(0)
摘要:<bean id="messageSource" class="org.springframework.context.support.ResourceBundleMessageSource"> <property name="basename" value="config.property.i18 阅读全文
posted @ 2020-12-02 15:46 小泉哥 阅读(431) 评论(0) 推荐(0)
摘要:1、在Spring配置文件中添加 xmlns:task="http://www.springframework.org/schema/task" http://www.springframework.org/schema/task http://www.springframework.org/sch 阅读全文
posted @ 2020-10-26 15:05 小泉哥 阅读(301) 评论(0) 推荐(0)
摘要:一、综述 近日,VMware Tanzu发布安全公告,公布了一个存在于Spring Framework中的反射型文件下载(Reflected File Download,RFD)漏洞CVE-2020-5421。CVE-2020-5421 可通过jsessionid路径参数,绕过防御RFD攻击的保护。 阅读全文
posted @ 2020-09-22 16:18 小泉哥 阅读(7924) 评论(0) 推荐(0)
摘要:背景: 最近升级Spring Framework相关版本,从4.0.2到4.3.29。 spring4.0.2是org.springframework.http.converter.json.MappingJacksonHttpMessageConverter spring4.3.29是org.sp 阅读全文
posted @ 2020-09-22 15:01 小泉哥 阅读(748) 评论(0) 推荐(0)
摘要:我们都知道,Spring可以@Value的方式读取properties中的值,只需要在配置文件中配置org.springframework.beans.factory.config.PropertyPlaceholderConfigurer <bean id="propertyConfigurer" 阅读全文
posted @ 2020-09-04 16:57 小泉哥 阅读(1434) 评论(0) 推荐(0)
摘要:@RestController注解,相当于@Controller+@ResponseBody两个注解的结合,返回json数据不需要在方法前面加@ResponseBody注解了,但使用@RestController这个注解,就不能返回jsp,html页面,视图解析器无法解析jsp,html页面。 阅读全文
posted @ 2020-07-27 16:44 小泉哥 阅读(439) 评论(0) 推荐(0)
摘要:TransactionAspectSupport.currentTransactionStatus().setRollbackOnly(); 阅读全文
posted @ 2020-07-01 00:40 小泉哥 阅读(1634) 评论(0) 推荐(0)
摘要:package com.xxxxx.config.intercepters; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servl 阅读全文
posted @ 2020-06-11 16:19 小泉哥 阅读(463) 评论(0) 推荐(0)
摘要:使用@ModelAttribute注解的实体类接收前端发来的数据格式需要为"x-www-form-urlencoded", @RequestBody注解的实体类接收前端的数据格式为JSON(application/json)格式。 (若是使用@ModelAttribute接收application/ 阅读全文
posted @ 2020-06-05 14:06 小泉哥 阅读(947) 评论(0) 推荐(0)
摘要:切面打印日志时,参数序列化异常异常信息:java.lang.IllegalStateException: It is illegal to call this method if the current request is not in asynchronous mode (i.e. isAsyn 阅读全文
posted @ 2020-06-04 20:18 小泉哥 阅读(3233) 评论(0) 推荐(0)