1.2.2.RELEASE
spring-mvc.xml
<?xml version="1.0" encoding="UTF-8"?><beans xmlns=“http://www.springframework.org/schema/beans” xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance”
xmlns:context=“http://www.springframework.org/schema/context” xmlns:mvc=“http://www.springframework.org/schema/mvc”
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.0.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd">
Spring MVC Configuration
<context:property-placeholder ignore-unresolvable=“true” location=“classpath:config.properties” />
<context:component-scan base-package=“com.itstyle.web” use-default-filters=“false”>
<context:include-filter type=“annotation” expression=“org.springframework.stereotype.Controller”/>
</context:component-scan>
mvc:annotation-driven/
text/html;charset=UTF-8
<mvc:default-servlet-handler />
<mvc:resources mapping=“/static/**” location=“/static/” />
<mvc:view-controller path=“/” view-name=“redirect:${web.view.login}”/>
config.properties
#============================#
#===== System settings ======#
#============================#
#产品信息设置
productName=科帮网 srping session
copyrightYear=2017
version=V1.0.0
#分页配置
page.pageSize=10
#索引页路径
web.view.index=/index
#登陆页面
web.view.login=/login
#视图文件存放路径
web.view.prefix=/WEB-INF/views/
web.view.suffix=.jsp
#静态文件后缀
web.staticFile=.css,.js,.png,.jpg,.gif,.jpeg,.bmp,.ico,.swf,.psd,.htc,.htm,.html,.crx,.xpi,.exe,.ipa,.apk
spring-redis.xml
<?xml version="1.0" encoding="UTF-8"?><beans xmlns=“http://www.springframework.org/schema/beans”
xmlns:xsi=“http://www.w3.org/2001/XMLSchema-instance” xmlns:context=“http://www.springframework.org/schema/context”
xmlns:aop=“http://www.springframework.org/schema/aop” xmlns:tx=“http://www.springframework.org/schema/tx”
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.0.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.0.xsd" default-autowire=“byName” default-lazy-init=“true”>
<context:property-placeholder location=“classpath:redis.properties” />
<bean id=“jedisConnectionFactory”
class=“org.springframework.data.redis.connection.jedis.JedisConnectionFactory”>
context:annotation-config/
redis.properties
#redis中心
redis.host=127.0.0.1
redis.port=6379
redis.password=123456
redis.maxIdle=100
redis.maxActive=300
redis.maxWait=1000
redis.testOnBorrow=true
redis.timeout=100000
web.xml
<?xml version="1.0" encoding="UTF-8"?>spring_session
contextConfigLocation
classpath:spring-redis.xml
springSessionRepositoryFilter
org.springframework.web.filter.DelegatingFilterProxy
springSessionRepositoryFilter
/*
org.springframework.web.context.ContextLoaderListener
encodingFilter
org.springframework.web.filter.CharacterEncodingFilter
最后
本人也收藏了一份Java面试核心知识点来应付面试,借着这次机会可以送给我的读者朋友们
目录:
Java面试核心知识点
一共有30个专题,足够读者朋友们应付面试啦,也节省朋友们去到处搜刮资料自己整理的时间!
Java面试核心知识点
已经有读者朋友靠着这一份Java面试知识点指导拿到不错的offer了
rk.web.filter.CharacterEncodingFilter
最后
本人也收藏了一份Java面试核心知识点来应付面试,借着这次机会可以送给我的读者朋友们
目录:
[外链图片转存中…(img-4xgs6xEC-1714203267887)]
Java面试核心知识点
一共有30个专题,足够读者朋友们应付面试啦,也节省朋友们去到处搜刮资料自己整理的时间!
[外链图片转存中…(img-2FlYMFtT-1714203267888)]
Java面试核心知识点
已经有读者朋友靠着这一份Java面试知识点指导拿到不错的offer了
[外链图片转存中…(img-2hUXorZT-1714203267888)]