X Tutup
Skip to content

Commit 53b81c0

Browse files
committed
Reversed latest mods, due to CI failure (objectify.py didn't like that change).
git-svn-id: https://src.springframework.org/svn/se-springpython-py/trunk/springpython@133 ce8fead1-4192-4296-8608-a705134b927f
1 parent a8e3eed commit 53b81c0

25 files changed

+56
-113
lines changed

docs/reference/src/components.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,11 +42,7 @@
4242
adapted to something very similar in Spring Python.</para>
4343

4444
<programlisting><![CDATA[
45-
<?xml version="1.0" encoding="UTF-8"?>
46-
<components
47-
xmlns="http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd"
48-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
49-
45+
<components>
5046
<component id="MovieLister" class="springpython.test.support.testSupportClasses.MovieLister">
5147
<property name="finder" local="MovieFinder" />
5248
</component>

docs/reference/src/remoting.xml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -62,11 +62,7 @@ print service.getData("Hello")
6262
file called <emphasis>applicationContext.xml</emphasis>.</para>
6363

6464
<programlisting><![CDATA[
65-
<?xml version="1.0" encoding="UTF-8"?>
66-
<components
67-
xmlns="http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd"
68-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
69-
65+
<components>
7066
<component id="service" class="Service"/>
7167
</components>
7268
]]></programlisting>
@@ -95,11 +91,7 @@ print service.getData("Hello")
9591
application context.</para>
9692

9793
<programlisting><![CDATA[
98-
<?xml version="1.0" encoding="UTF-8"?>
99-
<components
100-
xmlns="http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd"
101-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
102-
94+
<components>
10395
<component id="remoteService" class="Service"/>
10496
10597
<component id="serviceExporter" class="springpython.remoting.pyro.PyroServiceExporter">

samples/petclinic/cherrypy/applicationContext-client.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<components
3-
xmlns="http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
1+
<components>
52

63
<component id="controller" class="springpython.remoting.pyro.PyroProxyFactory">
74
<property name="serviceUrl">"PYROLOC://localhost:7766/Controller"</property>

samples/petclinic/cherrypy/applicationContext-server.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<components
3-
xmlns="http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5-
1+
<components>
2+
63
<component id="connectionFactory" class="springpython.database.factory.MySQLConnectionFactory">
74
<property name="username">"springpython"</property>
85
<property name="password">"springpython"</property>

samples/petclinic/cherrypy/applicationContext.xml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<components
3-
xmlns="http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5-
1+
<components>
2+
63
<component id="connectionFactory" class="springpython.database.factory.MySQLConnectionFactory">
74
<property name="username">"springpython"</property>
85
<property name="password">"springpython"</property>

samples/springwiki/applicationContext.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<components
3-
xmlns="http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
1+
<components>
52

63
<component id="controller" class="controller.SpringWikiController">
74
</component>

src/springpython/aop/__init__.py

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,35 @@ class RegexpMethodPointcutAdvisor(Pointcut, MethodMatcher, MethodInterceptor):
8585
"""
8686
This is a combination PointCut/MethodMatcher/MethodInterceptor. It allows associating one or more
8787
defined advices with a set of regular expression patterns.
88+
89+
The following block shows how to configure one using IoC.
90+
91+
<components>
92+
93+
<component id="wrappingInterceptor" class="springpython.test.support.testSupportClasses.WrappingInterceptor"/>
94+
95+
<component id="beginEndInterceptor" class="springpython.test.support.testSupportClasses.BeforeAndAfterInterceptor"/>
96+
97+
<component id="pointcutTest" class="springpython.aop.RegexpMethodPointcutAdvisor">
98+
<property name="advice">
99+
<list local="beginEndInterceptor"/>
100+
<list local="wrappingInterceptor"/>
101+
</property>
102+
<property name="patterns">[".*do.*"]</property>
103+
</component>
104+
105+
<component id="targetService" class="springpython.test.support.testSupportClasses.SampleService">
106+
<interceptor-ref name="pointcutTest"/>
107+
</component>
108+
109+
<component id="sampleService" class="springpython.aop.ProxyFactoryComponent">
110+
<property name="target" local="targetService"/>
111+
<property name="advice">
112+
<list local="pointcutTest"/>
113+
</property>
114+
</component>
115+
116+
</components>
88117
"""
89118
def __init__(self, advice = None, patterns = None):
90119
Pointcut.__init__(self)

test/springpythontest/support/affirmativeBasedApplicationContext.xml

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<components
3-
xmlns="http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
5-
1+
<components>
62
<component id="authenticationProvider" class="springpython.security.providers.InMemoryAuthenticationProvider">
73
<property name="userMap">
84
{

test/springpythontest/support/aopApplicationContext.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<components
3-
xmlns="http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
1+
<components>
52

63
<component id="wrappingInterceptor" class="springpythontest.support.testSupportClasses.WrappingInterceptor"/>
74

test/springpythontest/support/aopPyroApplicationContext.xml

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,4 @@
1-
<?xml version="1.0" encoding="UTF-8"?>
2-
<components
3-
xmlns="http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd"
4-
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
1+
<components>
52

63
<component id="wrappingInterceptor" class="springpythontest.support.testSupportClasses.WrappingInterceptor"/>
74

0 commit comments

Comments
 (0)
X Tutup