1. Use spring2.0 to configure event management and start Tomcat to report the following error:
Severe: exception sending context initialized event
Listener instance of class
Org. springframework. Web. Context. contextloaderlistener
Org. springframework. Beans. Factory. beancreationexception:
Error creating bean with name 'datasource 'defined in servletcontext Resource
[/WEB-INF/classes/applicationcontext. xml]: initialization of bean failed; Nested
Exception is Java. Lang. illegalargumentexception: pointcut is not
Well-formed: expecting 'name pattern' at character position
32
Execution (* COM. Shopping. Dao .*.*(..))
^
Caused by: Java. Lang. illegalargumentexception:
Pointcut is not well-formed: expecting 'name pattern' at character position
32
Execution (* COM. Shopping. Dao .*.*(..))
The solution is as follows:
<AOP: config>
<AOP: pointcut id = "allmanagermethod" expression = "execution (* COM. MTA. Car. Service. impl. *. * (...)"/>
<AOP: Advisor advice-ref = "txadvice" pointcut-ref = "allmanagermethod"/>
</AOP: config>
Note (*
Com... is followed by a space. If there is no space, the preceding error is reported when Tomcat is started !)