增加thymeleaf视图和远程zheng-ui静态资源视图配置

This commit is contained in:
shuzheng 2017-03-23 17:41:39 +08:00
parent 5b373d23da
commit d89f742877
18 changed files with 88 additions and 19 deletions

View File

@ -1,4 +1,5 @@
env=${profile.env}
zheng-ui.version=${zheng-ui.version}
zheng-ui.path=${zheng-ui.path}
### activeMq
AvtiveMQ.brokerURL=${AvtiveMQ.brokerURL}

View File

@ -1,4 +1,5 @@
profile.env=dev
zheng-ui.version=1.0.0
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/
### activeMq
AvtiveMQ.brokerURL=failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0)

View File

@ -1,4 +1,5 @@
profile.env=pre
zheng-ui.version=1.0.0
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/
### activeMq
AvtiveMQ.brokerURL=failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0)

View File

@ -1,4 +1,5 @@
profile.env=prod
zheng-ui.version=1.0.0
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/
### activeMq
AvtiveMQ.brokerURL=failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0)

View File

@ -1,4 +1,5 @@
profile.env=test
zheng-ui.version=1.0.0
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/
### activeMq
AvtiveMQ.brokerURL=failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0)

View File

@ -1,15 +1,15 @@
<?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:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
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/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- 根目录'/'对应页面 -->
<mvc:view-controller path="/" view-name="/index"/>
<mvc:view-controller path="/" view-name="/index.jsp"/>
<!-- 拦截器配置 -->
<mvc:interceptors>
@ -24,4 +24,22 @@
</mvc:interceptor>
</mvc:interceptors>
<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>

View File

@ -1,2 +1,3 @@
env=${profile.env}
zheng-ui.path=${zheng-ui.path}
ehcache.name=zheng-cms-ehcache

View File

@ -1,3 +1,4 @@
profile.env=dev
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/
### activeMq
AvtiveMQ.brokerURL=failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0)

View File

@ -1,3 +1,4 @@
profile.env=pre
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/
### activeMq
AvtiveMQ.brokerURL=failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0)

View File

@ -1,3 +1,4 @@
profile.env=prod
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/
### activeMq
AvtiveMQ.brokerURL=failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0)

View File

@ -1,3 +1,4 @@
profile.env=test
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/
### activeMq
AvtiveMQ.brokerURL=failover:(tcp://127.0.0.1:61616?wireFormat.maxInactivityDuration=0)

View File

@ -1,14 +1,32 @@
<?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:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
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/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- 根目录'/'对应页面 -->
<mvc:view-controller path="/" view-name="/index"/>
<mvc:view-controller path="/" view-name="/index.jsp"/>
<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>

View File

@ -1,2 +1,3 @@
env=${profile.env}
zheng-ui.path=${zheng-ui.path}
zheng-ui.version=${zheng-ui.version}

View File

@ -1,2 +1,3 @@
profile.env=dev
zheng-ui.version=1.0.0
zheng-ui.version=1.0.0
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/

View File

@ -1,2 +1,3 @@
profile.env=pre
zheng-ui.version=1.0.0
zheng-ui.version=1.0.0
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/

View File

@ -1,2 +1,3 @@
profile.env=prod
zheng-ui.version=1.0.0
zheng-ui.version=1.0.0
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/

View File

@ -1,2 +1,3 @@
profile.env=test
zheng-ui.version=1.0.0
zheng-ui.version=1.0.0
zheng-ui.path=http://ui.zhangshuzheng.cn:1000/

View File

@ -2,11 +2,11 @@
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xsi:schemaLocation="
http://www.springframework.org/schema/beans
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/mvc
http://www.springframework.org/schema/mvc/spring-mvc.xsd">
http://www.springframework.org/schema/mvc/spring-mvc.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<!-- 根目录'/'对应页面 -->
<mvc:view-controller path="/" view-name="/index.jsp"/>
@ -20,4 +20,22 @@
</mvc:interceptor>
</mvc:interceptors>
<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>