When starting the project, parsing the xml file is abnormal:
org.xml.sax.SAXParseException: cvc-complex-type.2.4.c 'aop:config'......
It can be seen from the error message that it is a problem caused by aop, open the configuration file, and after checking it, I know that there is no aop statement added:
<!--Enable annotation-based transactions, use transactions in the form of xml configuration (the main thing is to use configuration) -->
<aop:config>
<!-- pointcut expression-->
<aop:pointcut expression="execution(* com.dxt.bx.reader.api.service..*(..))" id="txPoint"/>
<!-- Configuration Transaction Enhancement-->
<aop:advisor advice-ref="txAdvice" pointcut-ref="txPoint"/>
</aop:config>
<!--Configure transaction enhancement, how to enter the transaction-->
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<!-- All methods are transactional methods-->
<tx:method name="*"/>
<!--Propagation behavior of all methods starting with xxx-->
<tx:method name="get*" read-only="true"/>
<tx:method name="save*" propagation="REQUIRED"/>
<tx:method name="insert*" propagation="REQUIRED"/>
<tx:method name="add*" propagation="REQUIRED"/>
<tx:method name="create*" propagation="REQUIRED"/>
<tx:method name="delete*" propagation="REQUIRED"/>
<tx:method name="update*" propagation="REQUIRED"/>
<tx:method name="find*" propagation="SUPPORTS" read-only="true"/>
<tx:method name="select*" propagation="SUPPORTS" read-only="true"/>
<tx:method name="get*" propagation="SUPPORTS" read-only="true"/>
</tx:attributes>
</tx:advice>
Add the declaration at the beginning of the xml:
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation=“http://www.springframework.org/schema/aop
After adding it is normal.