<?xml version="1.0" encoding="UTF-8"?><beans xmlns="http://www.springframework.org/schema/beans" xmlns:amq="http://activemq.apache.org/schema/core"? 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/schema/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.xsd http://activemq.apache.org/schema/core? http://activemq.apache.org/schema/core/activemq-core.xsd"> <!-- spring的配置文件這里主要配置和業(yè)務邏輯有關(guān)的 --> <!-- 掃描業(yè)務邏輯組件 (除去控制器不掃描)--> <context:component-scan base-package="com.zhangxin"> <context:exclude-filter type="annotation"? expression="org.springframework.stereotype.Controller"/> </context:component-scan> <context:property-placeholder location="classpath:dbconfig.properties"/> <bean id="pooledDataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource"> <property name="jdbcUrl" value="${jdbc.jcbcUrl}"></property> <property name="driverClass" value="${jdbc.driverClass}"></property> <property name="user" value="${jdbc.user}"></property> <property name="password" value="${jdbc.password}"></property> </bean> <bean id="sqlSessionFactory" class="org.mybatis.spring.SqlSessionFactoryBean">? ? ? ? <property name="dataSource" ref="pooledDataSource"/>? ? ? ? <property name="mapperLocations" value="classpath:mapper/*.xml"></property>? ? ? ? <property name="configLocation" value="classpath:mybatis-config.xml"></property>? ? ? </bean>? ?? <bean class="org.mybatis.spring.mapper.MapperScannerConfigurer">>? ? ? ? <property name="basePackage" value="com.zhangxin.cur.dao"></property>? ? ?</bean> ? ? ?? ? ?<bean id="transactionManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">? ? ? ? <!--控制數(shù)據(jù)源-->? ? ? ? <property name="dataSource" ref="pooledDataSource"></property>? ? ??? ? ?</bean>? ??? ? <aop:config>? ? <aop:pointcut expression="execution(* com.zhangxin.curd.service..*(..))" id="txPoint"/>? ? <aop:advisor advice-ref="txAdvice"? pointcut-ref="txPoint" />? ? </aop:config>? ??? ? <tx:advice id="txAdvice" transaction-manager="transactionManager">? ? <tx:attributes>? ? ? <tx:method name="*"/>? ? <tx:method name="get*" read-only="true"/>? ? </tx:attributes>? ? </tx:advice></beans>
Failed to load ApplicationContext 一直報錯??
qq_那抹思念因邇泛濫_0
2019-06-13 14:34:03