Skip to content

Commit 075e2ca

Browse files
author
Michael Zhou
committed
修改配置文件格式到webx 3.2.0风格,并格式化
1 parent 3d9602a commit 075e2ca

File tree

18 files changed

+796
-812
lines changed

18 files changed

+796
-812
lines changed

petstore/biz/src/main/resources/petstore/biz/manager.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
xmlns:context="http://www.springframework.org/schema/context"
55
xmlns:p="http://www.springframework.org/schema/p"
66
xsi:schemaLocation="
7-
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
8-
http://www.springframework.org/schema/context http://localhost:8080/schema/www.springframework.org/schema/context/spring-context.xsd
9-
"
7+
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
8+
http://www.springframework.org/schema/context http://localhost:8080/schema/www.springframework.org/schema/context/spring-context.xsd
9+
"
1010
default-autowire="byName">
1111

1212
<context:component-scan base-package="com.alibaba.sample.petstore.biz.impl">
Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,21 @@
1-
<?xml version="1.0" encoding="UTF-8" ?>
2-
<beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:p="http://www.springframework.org/schema/p"
35
xmlns:services="http://www.alibaba.com/schema/services"
46
xmlns:res-loaders="http://www.alibaba.com/schema/services/resource-loading/loaders"
5-
xmlns:beans="http://www.springframework.org/schema/beans"
6-
xmlns:p="http://www.springframework.org/schema/p"
77
xsi:schemaLocation="
8-
http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
9-
http://www.alibaba.com/schema/services/resource-loading/loaders http://localhost:8080/schema/services-resource-loading-loaders.xsd
10-
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
8+
http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
9+
http://www.alibaba.com/schema/services/resource-loading/loaders http://localhost:8080/schema/services-resource-loading-loaders.xsd
10+
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
1111
">
1212

13-
<services:resource-loading xmlns="http://www.alibaba.com/schema/services">
13+
<services:resource-loading>
1414

1515
<resource-alias pattern="/petstore/dal" name="/classpath/petstore/dal" />
1616

1717
<resource-alias pattern="/petstore/upload" name="/destdir/upload" />
1818

1919
</services:resource-loading>
2020

21-
</beans:beans>
21+
</beans:beans>

petstore/dal/src/main/resources/petstore/dal/dao.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
xmlns:context="http://www.springframework.org/schema/context"
55
xmlns:p="http://www.springframework.org/schema/p"
66
xsi:schemaLocation="
7-
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
8-
http://www.springframework.org/schema/context http://localhost:8080/schema/www.springframework.org/schema/context/spring-context.xsd
9-
"
7+
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
8+
http://www.springframework.org/schema/context http://localhost:8080/schema/www.springframework.org/schema/context/spring-context.xsd
9+
"
1010
default-autowire="byName">
1111

1212
<context:component-scan base-package="com.alibaba.sample.petstore.dal.dao.ibatis">

petstore/dal/src/main/resources/petstore/dal/data-source.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
xmlns:jdbc="http://www.springframework.org/schema/jdbc"
55
xmlns:p="http://www.springframework.org/schema/p"
66
xsi:schemaLocation="
7-
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
8-
http://www.springframework.org/schema/jdbc http://localhost:8080/schema/www.springframework.org/schema/jdbc/spring-jdbc.xsd
9-
">
7+
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
8+
http://www.springframework.org/schema/jdbc http://localhost:8080/schema/www.springframework.org/schema/jdbc/spring-jdbc.xsd
9+
">
1010

1111
<!-- ======================================================================== -->
1212
<!-- Hsqldb (Server mode) -->
Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
1-
<?xml version="1.0" encoding="UTF-8" ?>
2-
<beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xmlns:services="http://www.alibaba.com/schema/services"
4-
xmlns:beans="http://www.springframework.org/schema/beans"
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
54
xmlns:p="http://www.springframework.org/schema/p"
5+
xmlns:services="http://www.alibaba.com/schema/services"
66
xsi:schemaLocation="
7-
http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
8-
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
7+
http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
8+
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
99
">
1010

11-
<services:resource-loading xmlns="http://www.alibaba.com/schema/services">
11+
<services:resource-loading>
1212

1313
<resource-alias pattern="/petstore/dal" name="/classpath/petstore/dal" />
1414

1515
</services:resource-loading>
1616

17-
</beans:beans>
17+
</beans:beans>
Lines changed: 38 additions & 37 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,38 @@
1-
<?xml version="1.0" encoding="UTF-8" ?>
2-
<beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xmlns:services="http://www.alibaba.com/schema/services"
4-
xmlns:pl-conditions="http://www.alibaba.com/schema/services/pipeline/conditions"
5-
xmlns:pl-valves="http://www.alibaba.com/schema/services/pipeline/valves"
6-
xmlns:beans="http://www.springframework.org/schema/beans"
7-
xmlns:p="http://www.springframework.org/schema/p"
8-
xsi:schemaLocation="
9-
http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
10-
http://www.alibaba.com/schema/services/pipeline/conditions http://localhost:8080/schema/services-pipeline-conditions.xsd
11-
http://www.alibaba.com/schema/services/pipeline/valves http://localhost:8080/schema/services-pipeline-valves.xsd
12-
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
13-
">
14-
15-
<services:pipeline id="exceptionPipeline"
16-
xmlns="http://www.alibaba.com/schema/services/pipeline/valves">
17-
18-
<!-- 初始化turbine rundata,并在pipelineContext中设置可能会用到的对象(如rundata、utils),以便valve取得。 -->
19-
<prepareForTurbine />
20-
21-
<!-- 根据异常,选择适当的错误页面及statusCode。 -->
22-
<handleException defaultPage="error">
23-
24-
<on-exception type="com.alibaba.citrus.service.template.TemplateNotFoundException"
25-
statusCode="404" logging="brief" />
26-
27-
<on-exception type="com.alibaba.citrus.service.moduleloader.ModuleNotFoundException"
28-
statusCode="404" logging="brief" />
29-
30-
</handleException>
31-
32-
<performTemplateScreen />
33-
<renderTemplate />
34-
35-
</services:pipeline>
36-
37-
</beans:beans>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:p="http://www.springframework.org/schema/p"
5+
xmlns:services="http://www.alibaba.com/schema/services"
6+
xmlns:pl-conditions="http://www.alibaba.com/schema/services/pipeline/conditions"
7+
xmlns:pl-valves="http://www.alibaba.com/schema/services/pipeline/valves"
8+
xsi:schemaLocation="
9+
http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
10+
http://www.alibaba.com/schema/services/pipeline/conditions http://localhost:8080/schema/services-pipeline-conditions.xsd
11+
http://www.alibaba.com/schema/services/pipeline/valves http://localhost:8080/schema/services-pipeline-valves.xsd
12+
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
13+
">
14+
15+
<services:pipeline id="exceptionPipeline">
16+
17+
<!-- 初始化turbine rundata,并在pipelineContext中设置可能会用到的对象(如rundata、utils),以便valve取得。 -->
18+
<pl-valves:prepareForTurbine />
19+
20+
<!-- 根据异常,选择适当的错误页面及statusCode。 -->
21+
<pl-valves:handleException defaultPage="error">
22+
23+
<on-exception type="com.alibaba.citrus.service.template.TemplateNotFoundException"
24+
statusCode="404"
25+
logging="brief" />
26+
27+
<on-exception type="com.alibaba.citrus.service.moduleloader.ModuleNotFoundException"
28+
statusCode="404"
29+
logging="brief" />
30+
31+
</pl-valves:handleException>
32+
33+
<pl-valves:performTemplateScreen />
34+
<pl-valves:renderTemplate />
35+
36+
</services:pipeline>
37+
38+
</beans:beans>
Lines changed: 70 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -1,70 +1,70 @@
1-
<?xml version="1.0" encoding="UTF-8" ?>
2-
<beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
3-
xmlns:services="http://www.alibaba.com/schema/services"
4-
xmlns:pl-conditions="http://www.alibaba.com/schema/services/pipeline/conditions"
5-
xmlns:pl-valves="http://www.alibaba.com/schema/services/pipeline/valves"
6-
xmlns:beans="http://www.springframework.org/schema/beans"
7-
xmlns:p="http://www.springframework.org/schema/p"
8-
xsi:schemaLocation="
9-
http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
10-
http://www.alibaba.com/schema/services/pipeline/conditions http://localhost:8080/schema/services-pipeline-conditions.xsd
11-
http://www.alibaba.com/schema/services/pipeline/valves http://localhost:8080/schema/services-pipeline-valves.xsd
12-
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
13-
">
14-
15-
<services:pipeline xmlns="http://www.alibaba.com/schema/services/pipeline/valves">
16-
17-
<!-- 初始化turbine rundata,并在pipelineContext中设置可能会用到的对象(如rundata、utils),以便valve取得。 -->
18-
<prepareForTurbine />
19-
20-
<!-- 设置日志系统的上下文,支持把当前请求的详情打印在日志中。 -->
21-
<setLoggingContext />
22-
23-
<!-- 分析URL,取得target。 -->
24-
<analyzeURL homepage="homepage" />
25-
26-
<!-- 检查csrf token,防止csrf攻击和重复提交。假如request和session中的token不匹配,则出错,或显示expired页面。 -->
27-
<checkCsrfToken />
28-
29-
<!-- 检查页面的授权,如果当前用户无权访问该页面,则跳转到petstoreLogin页面 -->
30-
<pageAuthorization callbackClass="com.alibaba.sample.petstore.web.common.PetstoreUserAuth" />
31-
32-
<loop>
33-
<choose>
34-
<when>
35-
<!-- 执行带模板的screen,默认有layout。 -->
36-
<pl-conditions:target-extension-condition extension="null" />
37-
<performAction />
38-
<performTemplateScreen />
39-
<renderTemplate />
40-
</when>
41-
<when>
42-
<!-- 执行不带模板的screen,无layout。 -->
43-
<pl-conditions:target-extension-condition extension="do" />
44-
<performAction />
45-
<performScreen />
46-
</when>
47-
<when>
48-
<!-- 创建JSON,无模板,无layout。 -->
49-
<pl-conditions:target-extension-condition extension="json" />
50-
<performScreen />
51-
<renderResultAsJson />
52-
</when>
53-
<when>
54-
<!-- 读取资源文件。 -->
55-
<pl-conditions:path-condition name="/petstore/images/(.+)" />
56-
<getResource name="/petstore/images/$1" />
57-
</when>
58-
<otherwise>
59-
<!-- 将控制交还给servlet engine。 -->
60-
<exit />
61-
</otherwise>
62-
</choose>
63-
64-
<!-- 假如rundata.setRedirectTarget()被设置,则循环,否则退出循环。 -->
65-
<breakUnlessTargetRedirected />
66-
</loop>
67-
68-
</services:pipeline>
69-
70-
</beans:beans>
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:p="http://www.springframework.org/schema/p"
5+
xmlns:services="http://www.alibaba.com/schema/services"
6+
xmlns:pl-conditions="http://www.alibaba.com/schema/services/pipeline/conditions"
7+
xmlns:pl-valves="http://www.alibaba.com/schema/services/pipeline/valves"
8+
xsi:schemaLocation="
9+
http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
10+
http://www.alibaba.com/schema/services/pipeline/conditions http://localhost:8080/schema/services-pipeline-conditions.xsd
11+
http://www.alibaba.com/schema/services/pipeline/valves http://localhost:8080/schema/services-pipeline-valves.xsd
12+
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
13+
">
14+
15+
<services:pipeline>
16+
17+
<!-- 初始化turbine rundata,并在pipelineContext中设置可能会用到的对象(如rundata、utils),以便valve取得。 -->
18+
<pl-valves:prepareForTurbine />
19+
20+
<!-- 设置日志系统的上下文,支持把当前请求的详情打印在日志中。 -->
21+
<pl-valves:setLoggingContext />
22+
23+
<!-- 分析URL,取得target。 -->
24+
<pl-valves:analyzeURL homepage="homepage" />
25+
26+
<!-- 检查csrf token,防止csrf攻击和重复提交。假如request和session中的token不匹配,则出错,或显示expired页面。 -->
27+
<pl-valves:checkCsrfToken />
28+
29+
<!-- 检查页面的授权,如果当前用户无权访问该页面,则跳转到petstoreLogin页面 -->
30+
<pl-valves:pageAuthorization callbackClass="com.alibaba.sample.petstore.web.common.PetstoreUserAuth" />
31+
32+
<pl-valves:loop>
33+
<pl-valves:choose>
34+
<when>
35+
<!-- 执行带模板的screen,默认有layout。 -->
36+
<pl-conditions:target-extension-condition extension="null" />
37+
<pl-valves:performAction />
38+
<pl-valves:performTemplateScreen />
39+
<pl-valves:renderTemplate />
40+
</when>
41+
<when>
42+
<!-- 执行不带模板的screen,无layout。 -->
43+
<pl-conditions:target-extension-condition extension="do" />
44+
<pl-valves:performAction />
45+
<pl-valves:performScreen />
46+
</when>
47+
<when>
48+
<!-- 创建JSON,无模板,无layout。 -->
49+
<pl-conditions:target-extension-condition extension="json" />
50+
<pl-valves:performScreen />
51+
<pl-valves:renderResultAsJson />
52+
</when>
53+
<when>
54+
<!-- 读取资源文件。 -->
55+
<pl-conditions:path-condition name="/petstore/images/(.+)" />
56+
<pl-valves:getResource name="/petstore/images/$1" />
57+
</when>
58+
<otherwise>
59+
<!-- 将控制交还给servlet engine。 -->
60+
<pl-valves:exit />
61+
</otherwise>
62+
</pl-valves:choose>
63+
64+
<!-- 假如rundata.setRedirectTarget()被设置,则循环,否则退出循环。 -->
65+
<pl-valves:breakUnlessTargetRedirected />
66+
</pl-valves:loop>
67+
68+
</services:pipeline>
69+
70+
</beans:beans>

petstore/web/src/main/webapp/WEB-INF/common/resources.xml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
<?xml version="1.0" encoding="UTF-8" ?>
2-
<beans:beans xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xmlns:p="http://www.springframework.org/schema/p"
35
xmlns:services="http://www.alibaba.com/schema/services"
46
xmlns:res-filters="http://www.alibaba.com/schema/services/resource-loading/filters"
57
xmlns:res-loaders="http://www.alibaba.com/schema/services/resource-loading/loaders"
6-
xmlns:beans="http://www.springframework.org/schema/beans"
7-
xmlns:p="http://www.springframework.org/schema/p"
88
xsi:schemaLocation="
9-
http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
10-
http://www.alibaba.com/schema/services/resource-loading/filters http://localhost:8080/schema/services-resource-loading-filters.xsd
11-
http://www.alibaba.com/schema/services/resource-loading/loaders http://localhost:8080/schema/services-resource-loading-loaders.xsd
12-
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
9+
http://www.alibaba.com/schema/services http://localhost:8080/schema/services.xsd
10+
http://www.alibaba.com/schema/services/resource-loading/filters http://localhost:8080/schema/services-resource-loading-filters.xsd
11+
http://www.alibaba.com/schema/services/resource-loading/loaders http://localhost:8080/schema/services-resource-loading-loaders.xsd
12+
http://www.springframework.org/schema/beans http://localhost:8080/schema/www.springframework.org/schema/beans/spring-beans.xsd
1313
">
1414

15-
<services:resource-loading xmlns="http://www.alibaba.com/schema/services">
15+
<services:resource-loading>
1616

1717
<resource-alias pattern="/" name="/webroot" />
1818

@@ -47,4 +47,4 @@
4747

4848
</services:resource-loading>
4949

50-
</beans:beans>
50+
</beans:beans>

0 commit comments

Comments
 (0)