|
|
@@ -1,7 +1,26 @@
|
|
|
<?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"
|
|
|
xsi:schemaLocation="http://www.springframework.org/schema/beans
|
|
|
- http://www.springframework.org/schema/beans/spring-beans.xsd">
|
|
|
+ http://www.springframework.org/schema/beans/spring-beans.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
|
|
|
+
|
|
|
+ <context:property-placeholder location="classpath:config.properties"/>
|
|
|
+
|
|
|
+ <!-- 使用thymeleaf视图 -->
|
|
|
+ <bean id="templateResolver" class="org.thymeleaf.spring4.templateresolver.SpringResourceTemplateResolver">
|
|
|
+ <property name="order" value="0"/>
|
|
|
+ <property name="prefix" value="${zheng-ui.path}"/>
|
|
|
+ <property name="suffix" value=".html"/>
|
|
|
+ <property name="templateMode" value="HTML"/>
|
|
|
+ <property name="cacheable" value="false"/>
|
|
|
+ </bean>
|
|
|
+ <bean id="templateEngine" class="org.thymeleaf.spring4.SpringTemplateEngine">
|
|
|
+ <property name="templateResolver" ref="templateResolver"/>
|
|
|
+ <property name="enableSpringELCompiler" value="true"/>
|
|
|
+ </bean>
|
|
|
+ <bean class="org.thymeleaf.spring4.view.ThymeleafViewResolver">
|
|
|
+ <property name="templateEngine" ref="templateEngine"/>
|
|
|
+ </bean>
|
|
|
|
|
|
</beans>
|