11 2021 档案
摘要:在web.xml中配置 <filter> <filter-name>CharacterEncodingFilter</filter-name> <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-c
阅读全文
摘要:在springMVC中配置 1: <!-- 配置适配器处理器映射器--> <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter"> <property name=
阅读全文
摘要:@Controllerpublic class UserController { @RequestMapping(value = "/quick") public String save(){ System.out.println("controller"); return "success.jsp
阅读全文
摘要:@Configuration把一个类作为一个IoC容器,它的某个方法头上如果注册了@Bean,就会作为这个Spring容器中的Bean。@Scope注解 作用域@Lazy(true) 表示延迟初始化@Service用于标注业务层组件、@Controller用于标注控制层组件(如struts中的act
阅读全文
摘要:在上面加入命名空间 1:xmlns:context="http://www.springframework.org/schema/context" 2:http://www.springframework.org/schema/context http://www.springframework.o
阅读全文