forked from liangrui1988/java-admin
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapplication-pro1.xml
More file actions
101 lines (95 loc) · 5.09 KB
/
Copy pathapplication-pro1.xml
File metadata and controls
101 lines (95 loc) · 5.09 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:tx="http://www.springframework.org/schema/tx"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:mvc="http://www.springframework.org/schema/mvc" 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.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd
http://www.springframework.org/schema/mvc http://www.springframework.org/schema/mvc/spring-mvc.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx.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">
<import resource="core/application-core.xml" />
<!-- 数据库 -->
<bean id="dataSource" parent="baseDataSource" p:url="${jdbc.url}" />
<!-- mybatis映射 配置-->
<import resource="mybatis/application-data-dao.xml"/>
<!-- <bean id="txManager" -->
<!-- class="org.springframework.jdbc.datasource.DataSourceTransactionManager"> -->
<!-- <property name="dataSource" ref="dataSource" /> -->
<!-- </bean> -->
<!-- <tx:annotation-driven transaction-manager="txManager" /> -->
<!-- 定时任务 -->
<task:annotation-driven executor="myExecutor" scheduler="myScheduler" />
<task:executor id="myExecutor" pool-size="5" />
<task:scheduler id="myScheduler" pool-size="2" />
<!-- 通过配置织入@Aspectj切面 -->
<aop:aspectj-autoproxy />
<!-- AutowiredAnnotationBeanPostProcessor、CommonAnnotationBeanPostProcessor、PersistenceAnnotationBeanPostProcessor 以及 RequiredAnnotationBeanPostProcessor 这 4 个BeanPostProcessor。 -->
<context:annotation-config/>
<!--<mvc:annotation-driven/> -->
<mvc:annotation-driven>
<mvc:argument-resolvers>
<bean class="com.rui.pro1.common.utils.converter.JSONConverter" />
<bean class="com.rui.pro1.modules.sys.web.converter.permissionAnnotResolver" />
<bean class="com.rui.pro1.modules.sys.shiro.CurrentUserMethodArgumentResolver" />
<!-- <bean class="com.rui.pro1.modules.sys.web.converter.ValidateHandlerResolver" /> -->
<bean class="com.rui.pro1.modules.sys.web.converter.ValidateMethodParamHandlerResolver" />
</mvc:argument-resolvers>
<mvc:message-converters>
<bean
class="org.springframework.http.converter.json.MappingJackson2HttpMessageConverter">
<property name="objectMapper">
<bean class="com.rui.pro1.common.utils.converter.ResponseNullUtil"></bean>
</property>
</bean>
</mvc:message-converters>
</mvc:annotation-driven>
<!-- 处理静态文件 -->
<mvc:default-servlet-handler/>
<mvc:interceptors>
<mvc:interceptor>
<mvc:mapping path="/**"/>
<mvc:exclude-mapping path="/views/**"/>
<mvc:exclude-mapping path="/login"/>
<mvc:exclude-mapping path="/favicon.ico"/>
<mvc:exclude-mapping path="/logout"/>
<mvc:exclude-mapping path="/unauthorized"/>
<mvc:exclude-mapping path="/jcaptcha.jpg"/>
<mvc:exclude-mapping path="/loginPage"/>
<bean class="com.rui.pro1.modules.sys.web.interceptor.SysWebRequestInterceptor"/>
</mvc:interceptor>
<!-- <mvc:interceptor> -->
<!-- <mvc:mapping path="/**"/> -->
<!-- <mvc:exclude-mapping path="/views/**"/> -->
<!-- <mvc:exclude-mapping path="/login"/> -->
<!-- <mvc:exclude-mapping path="/favicon.ico"/> -->
<!-- <mvc:exclude-mapping path="/logout"/> -->
<!-- <mvc:exclude-mapping path="/unauthorized"/> -->
<!-- <mvc:exclude-mapping path="/jcaptcha.jpg"/> -->
<!-- <mvc:exclude-mapping path="/loginPage"/> -->
<!-- <bean class="com.rui.pro1.modules.sys.web.interceptor.VailInterceptor"/> -->
<!-- </mvc:interceptor> -->
</mvc:interceptors>
<bean id="viewResolver"
class="org.springframework.web.servlet.view.UrlBasedViewResolver">
<property name="viewClass" value="org.springframework.web.servlet.view.JstlView" />
<!-- <property name="prefix" value="/views/" /> -->
<!-- <property name="suffix" value=".html" /> -->
</bean>
<!-- freeMarker -->
<bean id="freeMarker" class="org.springframework.web.servlet.view.freemarker.FreeMarkerConfigurer">
<property name="templateLoaderPath" value="classpath:ftl"/><!--指定模板文件目录-->
<property name="freemarkerSettings"><!-- 设置FreeMarker环境属性-->
<props>
<prop key="template_update_delay">1800</prop><!--刷新模板的周期,单位为秒-->
<prop key="default_encoding">UTF-8</prop><!--模板的编码格式 -->
<prop key="locale">zh_CN</prop><!-- 本地化设置-->
</props>
</property>
</bean>
<!-- 获取bean -->
<bean id="sysApplicationContext" class="com.rui.pro1.common.utils.spring.SysApplicationContext">
</bean>
</beans>