spring
white......
擅长 javaSE javaEE hibernate spring 反射 设计模式 jdbc
展开
-
spring5 @Scope(“prototype“) 失效
spring5 @Scope("prototype") 失效原创 2022-06-18 20:41:08 · 528 阅读 · 0 评论 -
springMVC自带的编码过滤器
CharacterEncodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 forceEncoding t原创 2015-08-27 16:55:25 · 826 阅读 · 1 评论 -
spring 如何取的IOC容器得到里面的对象进行操作
import java.util.HashMap;import java.util.Map;import org.springframework.context.ApplicationContext;import org.springframework.context.support.ClassPathXmlApplicationContext;/** * spring工具类 *原创 2015-08-31 11:04:35 · 726 阅读 · 0 评论 -
hibernte与spring结合时,配置使hibernate的session的生命周期延迟,以及配置httpsession的时间
hibernate的session OpenSessionInViewFilter org.springframework.orm.hibernate3.support.OpenSessionInViewFilter flushMode AUTO OpenSessionInViewFilter /* =====原创 2015-08-27 16:58:06 · 2178 阅读 · 0 评论 -
spring prototype怎么注入到singleton 里面
经过测试之后用注解的方式 不行 所以只能采用容器取的方式。例子代码如下package com.dragon.service.test;import org.springframework.beans.factory.annotation.Autowired;import org.springframework.context.annotation.Scope;import or原创 2015-11-17 13:38:03 · 1858 阅读 · 0 评论 -
spring-test结合junit4
采用的版本如下 junit junit 4.11 org.springframework spring-test 4.0.2.RELEASE 建立base基类 用注解runwith表示结合spring-test 注解ContextConfiguration 表示要加载的spring配置文件packag原创 2015-11-17 13:47:39 · 548 阅读 · 0 评论 -
springBoot tomcat 不定时报404
用的是springBoot内嵌的tomcat,然后会发现页面隔一段时间就报404错误代码如下17:01:06.322 [http-nio-8080-exec-4] WARN o.s.web.servlet.PageNotFound - No mapping found for HTTP request with URI [/ehr/WEB-INF/ehr/commons/jsp/原创 2017-06-13 17:40:33 · 2006 阅读 · 0 评论 -
springBoot springSecurty x-frame-options deny
项目中用到iframe嵌入网页,然后用到springsecurity就被拦截了 浏览器报错 x-frame-options deny 原因是因为springSecurty使用X-Frame-Options防止网页被Frame解决办法把x-frame-options disable即可 protected void configure(HttpSecuri原创 2017-06-14 11:05:39 · 17199 阅读 · 3 评论