亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定

Spring的相關jar包都是5.0.3的,Myeclipse不識別<tx:advice>標簽

<?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:context="http://www.springframework.org/schema/context"
??? xmlns:aop="http://www.springframework.org/schema/aop"
??? xmlns:tx="http://www.springframework.org/schemma/tx"
??? xsi:schemaLocation="http://www.springframework.org/schema/beans
??????? http://www.springframework.org/schema/beans/spring-beans.xsd
??????? http://www.springframework.org/schema/context
??????? http://www.springframework.org/schema/context/spring-context.xsd
??????? http://www.springframework.org/schema/aop
??????? http://www.springframework.org/schema/aop/spring-aop.xsd
??????? http://www.springframework.org/schema/tx
??????? http://www.springframework.org/schema/tx/spring-tx-3.1.xsd">
???????
??????? <!-- 引入外部的屬性文件 -->
??????? <context:property-placeholder location="classpath:springJDBC.properties"/>
???????
??????? <!--配置c3p0連接池? -->
??????? <bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">
??????? <property name="driverClass" value="${driverClass}"></property>
??????? <property name="jdbcUrl" value="${jdbcUrl}"></property>
??????? <property name="user" value="${jdbcUsername}"></property>
??????? <property name="password" value="${jdbcPassword}"></property>
??????? </bean>
???????
??????? <!--配置業務層? -->
??????? <bean id="accountService" class="cui.springDemo3.AccountServiceImp">
??????? <property name="accountDao" ref="accountDao"></property>
??????? </bean>
???????
??????? <!--配置持久層? -->
??????? <bean id="accountDao" class="cui.springDemo3.AccountDaoImp">
??????? <property name="dataSource" ref="dataSource"></property>
??????? </bean>
???????
??????? <!--配置事務管理器? -->
??????? <bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
??????? ?<property name="dataSource" ref="dataSource"></property>
??????? </bean>
???????
??????? <!--配置事務的通知(事務的增強)? -->
??????? <tx:advice id="txAdvice" transaction-manager="transactionManager">
??????? ?<tx:attributies>
??????? ??<tx:method name="transfer" propagation="REQUIRED"></tx:method>
??????? ?</tx:attributies>
??????? </tx:advice>
???????
??????? <!--配置切面? -->
??????? <aop:config>
??????? ?<!--配置切入點? -->
??????? ?<aop:pointcut expression="execution(*cui.springDemo3.AccountSercice+.*(..))" id="pointcut1"/>
??????? ?<!--配置切面? -->
??????? ?<aop:advisor advice-ref="txAdvice" pointcut-ref="pointcut1"/>
??????? </aop:config>
???????
??????
???????
</beans>

正在回答

1 回答

跟你架包沒關系,要是版本太新選個穩定的4.3版本,也不是myeclipse不識別https://img1.sycdn.imooc.com//5b9750f700013dde07820506.jpg寫錯了


0 回復 有任何疑惑可以回復我~

舉報

0/150
提交
取消

Spring的相關jar包都是5.0.3的,Myeclipse不識別<tx:advice>標簽

我要回答 關注問題
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號