初始化
This commit is contained in:
@@ -0,0 +1,89 @@
|
||||
<?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:jee="http://www.springframework.org/schema/jee"
|
||||
xmlns:tx="http://www.springframework.org/schema/tx" xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
xmlns:aop="http://www.springframework.org/schema/aop"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-4.0.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
|
||||
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-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/task
|
||||
http://www.springframework.org/schema/task/spring-task.xsd
|
||||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop.xsd"
|
||||
default-lazy-init="true">
|
||||
|
||||
<!-- 导入外部的properties文件-->
|
||||
<context:property-placeholder location="classpath*:jdbc.properties" ignore-unresolvable="true"/>
|
||||
<!-- 注册识别注解 -->
|
||||
<context:component-scan base-package="com.ifish.converter,com.ifish.daoImpl,com.ifish.serviceImpl,com.ifishNew.help"/>
|
||||
|
||||
<!-- c3p0连接池 -->
|
||||
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
|
||||
<property name="driverClass" value="${c3p0.driverClassName}" />
|
||||
<property name="jdbcUrl" value="${c3p0.url}" />
|
||||
<property name="user" value="${c3p0.username}" />
|
||||
<property name="password" value="${c3p0.password}" />
|
||||
<property name="autoCommitOnClose" value="${c3p0.autoCommitOnClose}" />
|
||||
<property name="checkoutTimeout" value="${c3p0.checkoutTimeout}" />
|
||||
<property name="initialPoolSize" value="${c3p0.initialPoolSize}" />
|
||||
<property name="minPoolSize" value="${c3p0.minPoolSize}" />
|
||||
<property name="maxPoolSize" value="${c3p0.maxPoolSize}" />
|
||||
<property name="maxIdleTime" value="${c3p0.maxIdleTime}" />
|
||||
<property name="acquireIncrement" value="${c3p0.acquireIncrement}" />
|
||||
<property name="idleConnectionTestPeriod" value="${c3p0.idleConnectionTestPeriod}" />
|
||||
</bean>
|
||||
|
||||
<!-- sessionFactory工厂 -->
|
||||
<bean id="sessionFactory" class="org.springframework.orm.hibernate4.LocalSessionFactoryBean">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<property name="mappingLocations">
|
||||
<list>
|
||||
<value>classpath*:/com/ifish/entity/hbm/*.hbm.xml</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="packagesToScan">
|
||||
<list>
|
||||
<value>com.ifish.entity</value>
|
||||
</list>
|
||||
</property>
|
||||
<property name="hibernateProperties">
|
||||
<props>
|
||||
<prop key="hibernate.dialect">${hibernate.dialect}</prop>
|
||||
<prop key="hibernate.show_sql">${hibernate.show_sql}</prop>
|
||||
<prop key="hibernate.format_sql">${hibernate.format_sql}</prop>
|
||||
<prop key="hibernate.hbm2ddl.auto">${hibernate.hbm2ddl.auto}</prop>
|
||||
<prop key="hibernate.query.substitutions">${hibernate.query.substitutions}</prop>
|
||||
<prop key="hibernate.jdbc.batch_size">${"hibernate.jdbc.batch_size"}</prop>
|
||||
</props>
|
||||
</property>
|
||||
</bean>
|
||||
|
||||
<!-- 开启事务注解 -->
|
||||
<tx:annotation-driven transaction-manager="txManager" />
|
||||
<!-- Hibernate事务管理器 -->
|
||||
<bean id="txManager" class="org.springframework.orm.hibernate4.HibernateTransactionManager">
|
||||
<property name="sessionFactory" ref="sessionFactory" />
|
||||
</bean>
|
||||
|
||||
<!-- async配置 -->
|
||||
<task:annotation-driven executor="asyncExecutor"/>
|
||||
<task:executor id="asyncExecutor" pool-size="10-100" queue-capacity="5"/>
|
||||
|
||||
<!-- 导入外部的properties文件-->
|
||||
<context:property-placeholder location="classpath*:jPpush.properties" ignore-unresolvable="true"/>
|
||||
<!-- 云信 -->
|
||||
<bean id="neteaseIM" class="com.ifish.netease.NeteaseIM">
|
||||
<constructor-arg index="0">
|
||||
<!-- appKey -->
|
||||
<value>${netease.appKey}</value>
|
||||
</constructor-arg>
|
||||
<constructor-arg index="1">
|
||||
<!-- appSecret -->
|
||||
<value>${netease.appSecret}</value>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,60 @@
|
||||
<beans:beans xmlns="http://www.springframework.org/schema/security"
|
||||
xmlns:beans="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
||||
http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
|
||||
http://www.springframework.org/schema/security
|
||||
http://www.springframework.org/schema/security/spring-security-3.2.xsd" default-lazy-init="true">
|
||||
|
||||
<http auto-config="true" use-expressions="true">
|
||||
|
||||
<!-- 自上而下验证,只要满足一条就返回 -->
|
||||
<!-- 已验证才能访问 -->
|
||||
<intercept-url pattern="/page/public/index.do" access="isAuthenticated()"/>
|
||||
<intercept-url pattern="/page/public/changePwd.do" access="isAuthenticated()"/>
|
||||
<intercept-url pattern="/page/public/savePwd.do" access="isAuthenticated()"/>
|
||||
<!-- 允许所有人访问 -->
|
||||
<intercept-url pattern="/page/public/**" access="permitAll"/>
|
||||
<!-- 根据角色访问 -->
|
||||
<intercept-url pattern="/ueditor/ueditor.jsp" access="hasAnyRole('ROLE_ADMIN')" />
|
||||
<intercept-url pattern="/page/user/**" access="hasAnyRole('ROLE_USER')" />
|
||||
<intercept-url pattern="/page/vender/**" access="hasAnyRole('ROLE_VENDER')" />
|
||||
<intercept-url pattern="/page/factory/**" access="hasAnyRole('ROLE_FACTORY')" />
|
||||
<intercept-url pattern="/page/**" access="hasAnyRole('ROLE_ADMIN')" />
|
||||
|
||||
<!-- 未认证页面跳转 -->
|
||||
<access-denied-handler error-page="/page/public/login.do" />
|
||||
<!-- 登陆配置 -->
|
||||
<form-login login-page="/page/public/login.do" authentication-success-handler-ref="authenticationSuccessHandler" authentication-failure-handler-ref="authenticationFailureHandler" login-processing-url="/j_spring_security_check"/>
|
||||
<!-- 注销配置 -->
|
||||
<logout logout-success-url="/page/public/login.do" invalidate-session="true"/>
|
||||
|
||||
</http>
|
||||
|
||||
<beans:bean id="authenticationFailureHandler" class="com.ifish.handler.SecurityAuthenticationFailureHandler">
|
||||
<beans:property name="defaultFailureUrl" value="/page/public/login.do"></beans:property>
|
||||
</beans:bean>
|
||||
|
||||
<beans:bean id="authenticationSuccessHandler" class="com.ifish.handler.SecurityAuthenticationSuccessHandler">
|
||||
<beans:property name="loginSuccessUrl">
|
||||
<beans:map>
|
||||
<beans:entry key="defaultUrl" value="/page/public/index.do" />
|
||||
<beans:entry key="ROLE_USER" value="/page/public/index.do" />
|
||||
<beans:entry key="ROLE_ADMIN" value="/page/public/index.do" />
|
||||
<beans:entry key="ROLE_VENDER" value="/page/public/index.do" />
|
||||
<beans:entry key="ROLE_FACTORY" value="/page/public/index.do" />
|
||||
</beans:map>
|
||||
</beans:property>
|
||||
</beans:bean>
|
||||
|
||||
<authentication-manager>
|
||||
<authentication-provider>
|
||||
<!-- 从数据库取用户和权限 -->
|
||||
<jdbc-user-service data-source-ref="dataSource"
|
||||
users-by-username-query="select j_username username,j_password password,j_enabled enabled from tbl_security_user where j_username=?"
|
||||
authorities-by-username-query="select j_username username,j_role role from tbl_security_user where j_username=?" />
|
||||
<!-- MD5加密 -->
|
||||
<password-encoder hash="md5"></password-encoder>
|
||||
</authentication-provider>
|
||||
</authentication-manager>
|
||||
|
||||
</beans:beans>
|
||||
@@ -0,0 +1,7 @@
|
||||
connect_timeout = 2
|
||||
network_timeout = 30
|
||||
charset = UTF-8
|
||||
http.tracker_http_port = 85
|
||||
http.anti_steal_token = no
|
||||
http.secret_key = FastDFS1234567890
|
||||
tracker_server = 120.55.190.56:22131
|
||||
@@ -0,0 +1,8 @@
|
||||
connect_timeout = 2
|
||||
network_timeout = 30
|
||||
charset = UTF-8
|
||||
http.tracker_http_port = 8017
|
||||
http.anti_steal_token = no
|
||||
http.secret_key = FastDFS1234567890
|
||||
tracker_server = 139.196.24.156:22122
|
||||
|
||||
@@ -0,0 +1,9 @@
|
||||
#appKey
|
||||
jpush.ios.appKey=d147124018074eb970474e48
|
||||
#secret
|
||||
jpush.ios.secret=a7d41825e75082b13675c326
|
||||
#production
|
||||
jpush.ios.productionMode=false
|
||||
#\u4e91\u4fe1IM
|
||||
netease.appKey=87b0e3315dfc2df08060bcb54246da68
|
||||
netease.appSecret=e62f6c247b46
|
||||
@@ -0,0 +1,32 @@
|
||||
c3p0.driverClassName=com.mysql.jdbc.Driver
|
||||
c3p0.url=jdbc\:mysql\://localhost\:3306/myfishdb?characterEncoding\=UTF-8
|
||||
c3p0.username=ifish
|
||||
c3p0.password=ifish7pwd
|
||||
#c3p0.username=root
|
||||
#c3p0.password=123456
|
||||
|
||||
c3p0.autoCommitOnClose=true
|
||||
c3p0.initialPoolSize=20
|
||||
c3p0.minPoolSize=20
|
||||
c3p0.maxPoolSize=50
|
||||
c3p0.acquireIncrement=3
|
||||
|
||||
c3p0.checkoutTimeout=5000
|
||||
c3p0.maxIdleTime=7200
|
||||
c3p0.idleConnectionTestPeriod=18000
|
||||
#c3p0.maxIdleTimeExcessConnections=1800
|
||||
|
||||
#c3p0.automaticTestTable=C3P0TestTable
|
||||
#c3p0.testConnectionOnCheckout=false
|
||||
#c3p0.testConnectionOnCheckin=false
|
||||
|
||||
#org.hibernate.dialect.MySQLInnoDBDialect
|
||||
hibernate.dialect=org.hibernate.dialect.MySQLDialect
|
||||
hibernate.show_sql=false
|
||||
hibernate.format_sql=true
|
||||
hibernate.hbm2ddl.auto=false
|
||||
hibernate.jdbc.batch_size=50
|
||||
hibernate.query.substitutions=true 1,false 0
|
||||
hibernate.cache.use_second_level_cache=false
|
||||
hibernate.cache.use_query_cache=false
|
||||
hibernate.cache.region.factory_class=org.hibernate.cache.ehcache.EhCacheRegionFactory
|
||||
@@ -0,0 +1,37 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<configuration scan="true">
|
||||
<!-- 尽量别用绝对路径,如果带参数不同容器路径解释可能不同 -->
|
||||
<property name="LOG_HOME" value="/logs" />
|
||||
<appender name="Console" class="ch.qos.logback.core.ConsoleAppender">
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss.SSS} %-5level %logger{50} %msg%n</pattern>
|
||||
</encoder>
|
||||
</appender>
|
||||
|
||||
<!-- 按照每天生成日志文件 -->
|
||||
<appender name="file" class="ch.qos.logback.core.rolling.RollingFileAppender">
|
||||
<file>${LOG_HOME}/ifishSystem/localhost.log</file>
|
||||
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
|
||||
<FileNamePattern>${LOG_HOME}/ifishSystem/%d{yyyy-MM-dd}.log</FileNamePattern>
|
||||
<MaxHistory>30</MaxHistory>
|
||||
<timeBasedFileNamingAndTriggeringPolicy class="ch.qos.logback.core.rolling.SizeAndTimeBasedFNATP">
|
||||
<maxFileSize>100MB</maxFileSize>
|
||||
</timeBasedFileNamingAndTriggeringPolicy>
|
||||
</rollingPolicy>
|
||||
<encoder>
|
||||
<pattern>%d{yyyy-MM-dd HH:mm:ss} 【%-5level】 【%logger{50}】 %msg%n</pattern>
|
||||
<charset>UTF-8</charset>
|
||||
</encoder>
|
||||
<filter class="ch.qos.logback.classic.filter.ThresholdFilter">
|
||||
<level>WARN</level>
|
||||
</filter>
|
||||
</appender>
|
||||
|
||||
<!-- 将级别为“info”及大于“info”的日志信息传递给root处理,本身并不打印 -->
|
||||
<root level="INFO">
|
||||
<!-- root将级别为“INFO”及大于“INFO”的日志信息交给已经配置好的名为“Console”的appender处理,“Console”appender将信息打印到Console; -->
|
||||
<appender-ref ref="file" />
|
||||
<!-- 标识这个appender将会添加到这个logger -->
|
||||
<!-- <appender-ref ref="File" /> -->
|
||||
</root>
|
||||
</configuration>
|
||||
@@ -0,0 +1,7 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE configuration PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">
|
||||
<configuration>
|
||||
<settings>
|
||||
<setting name="mapUnderscoreToCamelCase" value="true"/>
|
||||
</settings>
|
||||
</configuration>
|
||||
@@ -0,0 +1,30 @@
|
||||
#\u6240\u6709\u9759\u6001\u8d44\u6e90\u76ee\u5f55
|
||||
path_static_file=/mydata/tmp
|
||||
#\u5382\u5bb6logo
|
||||
path_img_vender=/mydata/tmp/Img/vender
|
||||
#\u5e7f\u544a\u56fe
|
||||
path_img_ad=/mydata/tmp/Img/adInfo
|
||||
#\u5546\u54c1\u56fe
|
||||
path_img_goods=/mydata/tmp/Img/goods
|
||||
#\u5546\u54c1\u4ecb\u7ecd\u56fe\u7247
|
||||
path_commodity=/mydata/tmp/Img/commodity
|
||||
#\u8d44\u8baf\u56fe
|
||||
path_img_information=/mydata/tmp/Img/information
|
||||
#banner\u56fe
|
||||
path_img_banner=/mydata/tmp/Img/banner
|
||||
#\u7528\u6237\u7b49\u7ea7icon
|
||||
path_level_icon=/mydata/tmp/Img/levelIcon
|
||||
#\u5c01\u9762\u56fe
|
||||
path_picture4=/mydata/tmp/Img/shops
|
||||
#\u4fdd\u5b58\u7f16\u8f91\u5668\u7f51\u9875\u5730\u5740
|
||||
ueditor_path=/mydata/tmp/ueditorHtml/
|
||||
#\u4e91\u4fe1\u7231\u9c7c\u5947\u5b98\u65b9\u5e10\u53f7
|
||||
ifish_account=ifish
|
||||
#IM\u5b98\u65b9\u624b\u673a\u53f7
|
||||
netease_phone=18501773036
|
||||
#FastDFS\u6587\u4ef6URL\u8bbf\u95ee\u8def\u5f84(\u672c\u5730\u548c\u6d4b\u8bd5\u73af\u5883)
|
||||
fastDFS_url_local=https://app.zhangxinyanv5.top/
|
||||
#FastDFS\u6587\u4ef6URL\u8bbf\u95ee\u8def\u5f84(\u6b63\u5f0f\u73af\u5883)
|
||||
fastDFS_url_app=http://app.ifish7.com/
|
||||
#\u73af\u5883(local:\u672c\u5730\u73af\u5883,test:\u6d4b\u8bd5\u73af\u5883,\u6b63\u5f0f\u73af\u5883:product)
|
||||
env=test
|
||||
@@ -0,0 +1,83 @@
|
||||
<?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:c="http://www.springframework.org/schema/c"
|
||||
xmlns:context="http://www.springframework.org/schema/context"
|
||||
xmlns:mvc="http://www.springframework.org/schema/mvc"
|
||||
xmlns:p="http://www.springframework.org/schema/p"
|
||||
xmlns:task="http://www.springframework.org/schema/task"
|
||||
|
||||
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.1.xsd
|
||||
http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-4.1.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.1.xsd
|
||||
http://www.springframework.org/schema/webflow-config http://www.springframework.org/schema/webflow-config/spring-webflow-config-2.0.xsd
|
||||
http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-4.1.xsd
|
||||
http://www.springframework.org/schema/jms http://www.springframework.org/schema/jms/spring-jms-4.1.xsd
|
||||
http://www.springframework.org/schema/lang http://www.springframework.org/schema/lang/spring-lang-4.1.xsd
|
||||
http://www.springframework.org/schema/osgi http://www.springframework.org/schema/osgi/spring-osgi-1.2.xsd
|
||||
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.1.xsd
|
||||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.1.xsd
|
||||
http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task.xsd
|
||||
">
|
||||
<!-- 导入外部的properties文件-->
|
||||
<context:property-placeholder location="classpath*:jdbc.properties" ignore-unresolvable="true"/>
|
||||
|
||||
<!-- c3p0连接池 -->
|
||||
<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
|
||||
<property name="driverClass" value="${c3p0.driverClassName}" />
|
||||
<property name="jdbcUrl" value="${c3p0.url}" />
|
||||
<property name="user" value="${c3p0.username}" />
|
||||
<property name="password" value="${c3p0.password}" />
|
||||
<property name="autoCommitOnClose" value="${c3p0.autoCommitOnClose}" />
|
||||
<property name="checkoutTimeout" value="${c3p0.checkoutTimeout}" />
|
||||
<property name="initialPoolSize" value="${c3p0.initialPoolSize}" />
|
||||
<property name="minPoolSize" value="${c3p0.minPoolSize}" />
|
||||
<property name="maxPoolSize" value="${c3p0.maxPoolSize}" />
|
||||
<property name="maxIdleTime" value="${c3p0.maxIdleTime}" />
|
||||
<property name="acquireIncrement" value="${c3p0.acquireIncrement}" />
|
||||
<property name="idleConnectionTestPeriod" value="${c3p0.idleConnectionTestPeriod}" />
|
||||
</bean>
|
||||
|
||||
<!-- ========================================针对myBatis的配置项============================== -->
|
||||
<!-- 配置sqlSessionFactory -->
|
||||
<bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">
|
||||
<!-- 实例化sqlSessionFactory时需要使用上述配置好的数据源以及SQL映射文件 -->
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
<!-- 自动扫描me/gacl/mapping/目录下的所有SQL映射的xml文件, 省掉Configuration.xml里的手工配置
|
||||
value="classpath:me/gacl/mapping/*.xml"指的是classpath(类路径)下me.gacl.mapping包中的所有xml文件
|
||||
UserMapper.xml位于me.gacl.mapping包下,这样UserMapper.xml就可以被自动扫描
|
||||
-->
|
||||
<property name="typeAliasesPackage" value="com.ifishNew.bean"/>
|
||||
<property name="configLocation" value="classpath:mybatis-config.xml"></property>
|
||||
</bean>
|
||||
<!-- 配置扫描器 -->
|
||||
<bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">
|
||||
<property name="sqlSessionFactoryBeanName" value="sqlSessionFactory"></property>
|
||||
<property name="basePackage" value="com.ifishNew.mapper" />
|
||||
|
||||
</bean>
|
||||
|
||||
<!-- ========================================分隔线========================================= -->
|
||||
<!-- 配置Spring的事务管理器 -->
|
||||
<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
|
||||
<property name="dataSource" ref="dataSource" />
|
||||
</bean>
|
||||
|
||||
<!-- async配置
|
||||
<task:annotation-driven executor="asyncExecutor"/>
|
||||
<task:executor id="asyncExecutor" pool-size="10-100" queue-capacity="5"/>-->
|
||||
|
||||
<!-- 导入外部的properties文件-->
|
||||
<context:property-placeholder location="classpath*:jPpush.properties" ignore-unresolvable="true"/>
|
||||
<!-- 云信 -->
|
||||
<bean id="neteaseIM" class="com.ifish.netease.NeteaseIM">
|
||||
<constructor-arg index="0">
|
||||
<!-- appKey -->
|
||||
<value>${netease.appKey}</value>
|
||||
</constructor-arg>
|
||||
<constructor-arg index="1">
|
||||
<!-- appSecret -->
|
||||
<value>${netease.appSecret}</value>
|
||||
</constructor-arg>
|
||||
</bean>
|
||||
</beans>
|
||||
@@ -0,0 +1,49 @@
|
||||
<?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/mvc
|
||||
http://www.springframework.org/schema/mvc/spring-mvc-4.0.xsd
|
||||
http://www.springframework.org/schema/context
|
||||
http://www.springframework.org/schema/context/spring-context-4.0.xsd"
|
||||
default-lazy-init="true">
|
||||
|
||||
<!-- @Controller注解的使用前提配置 -->
|
||||
<mvc:annotation-driven />
|
||||
<!-- 扫描指定包 -->
|
||||
<context:component-scan base-package="com.ifish.ueditor.action,com.ifish.action,com.ifish.exception" />
|
||||
<!-- 静态资源访问,资源缓存一年 -->
|
||||
<mvc:resources mapping="/ueditor/**" location="/ueditor/" cache-period="1500" />
|
||||
|
||||
<!-- 拦截器 -->
|
||||
<mvc:interceptors>
|
||||
<!-- 使用bean定义一个Interceptor,直接定义在mvc:interceptors根下面的Interceptor将拦截所有的请求 -->
|
||||
<bean class="com.ifish.interceptor.SecurityValidateInterceptor" />
|
||||
</mvc:interceptors>
|
||||
|
||||
<!-- url映射 -->
|
||||
<bean id="viewResolver" class="org.springframework.web.servlet.view.InternalResourceViewResolver">
|
||||
<property name="prefix" value="/WEB-INF/view/"></property>
|
||||
<property name="suffix" value=".jsp"></property>
|
||||
</bean>
|
||||
<!-- 过滤器 -->
|
||||
<bean id="multipartResolver" class="com.ifish.ueditor.CommonsMultiparResolver">
|
||||
<property name="maxUploadSize" value="3145728"/>
|
||||
<property name="defaultEncoding" value="UTF-8"/>
|
||||
</bean>
|
||||
<!-- 文件上传 -->
|
||||
<!-- <bean id="multipartResolver" class="org.springframework.web.multipart.commons.CommonsMultipartResolver">
|
||||
<property name="maxUploadSize" value="3145728"/>
|
||||
</bean> -->
|
||||
<!-- 配置返回Json数据,方法用ResponseBody注解 -->
|
||||
<!-- <bean class="org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter">
|
||||
<property name="messageConverters">
|
||||
<list>
|
||||
<bean class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter" />
|
||||
</list>
|
||||
</property>
|
||||
</bean> -->
|
||||
</beans>
|
||||
Reference in New Issue
Block a user