SSH 통합 문제: The prefix "tx" for element "tx: annotation - driven" is not bound
http://blog.csdn.net/gabriel80/archive/2008/05/29/2492608.aspx
The prefix "tx" for element "tx:advice" is not bound
이 잘못된 원인 은 매우 간단 하 다.
우리 가 AOP 를 정의 할 때schema 를 불 러 오지 않 았 습 니 다.
구체 적 인 표현 은 다음 과 같다.
<beans>
<tx:advice id="txAdvice" transaction-manager="transactionManager">
<tx:attributes>
<tx:method name="get*" read-only="true"/>
<tx:method name="*" propagation="REQUIRES_NEW" rollback-for="Exception"/>
</tx:attributes>
</tx:advice>
<!-- aop -->
<aop:config proxy-target-class="true">
....
</aop:config>
</beans>
이 때 < TX > 를 알 아 보지 못 하 는 이상 한 탭 을 던 집 니 다.처음에는 JAR 가방 을 안 넣 은 줄 알 았 는데.
나중에 AOP 문 서 를 읽 고 나 서 야 < beans > 에 "xmlns: aop" 의 이름 을 추가 하고 "xsi: schema Location" 에서 op 설정 의 schema 주 소 를 지정 합 니 다.
프로필 은 다음 과 같 습 니 다:
<?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:aop="http://www.springframework.org/schema/aop"
xmlns:tx="
http://www.springframework.org/schema/tx"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop.xsd">
이것 이 야 말로 가장 중요 한 곳 이다.뒤의 설정 은 변 하지 않 습 니 다...
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
XML 소개나중에 나 자신과 물론 XML 😀에 대해 배워야 하는 모든 사람을 위해 참조로 사용할 수 있도록 짧은 소개를 작성하고 싶습니다. JSON을 JavaScript Objects 형태의 일반 텍스트로 데이터를 전송하는 방...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.