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

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

applicationContext.xml的時候沒有自動提示功能?

applicationContext.xml的時候沒有自動提示功能,如class屬性的內容,

<!-- 配置層c3p0連接池 -->

? ? ? ?<bean id="datasource" class="com.mchange.v2.c3p0.ComboPooledDataSource">


正在回答

2 回答

我的也沒有。。。親解決了回一下

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

<?xml version="1.0" encoding="UTF-8"?>

<beans xmlns="http://www.springframework.org/schema/beans"

xmlns:context="http://www.springframework.org/schema/context"

xmlns:aop="http://www.springframework.org/schema/aop" xmlns:tx="http://www.springframework.org/schema/tx"

xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p"

xsi:schemaLocation="http://www.springframework.org/schema/beans?

? ? http://www.springframework.org/schema/beans/spring-beans-3.0.xsd

? ? http://www.springframework.org/schema/context

? ? http://www.springframework.org/schema/context/spring-context-3.0.xsd

? ? http://www.springframework.org/schema/aop

? ? ? ? ? ?http://www.springframework.org/schema/aop/spring-aop-3.0.xsd

? ? ? ? ? ?http://www.springframework.org/schema/tx

? ? ? ? ? ?http://www.springframework.org/schema/tx/spring-tx-3.0.xsd

? ? ">


<!-- 引入外部的屬性文件 -->

<context:property-placeholder location="classpath:jdbc.properties" />

<!-- 配置c3p0連接池 -->

<bean id="dataSource" class="com.mchange.v2.c3p0.ComboPooledDataSource">

<property name="driverClass" value="${classDriver}"></property>

<property name="jdbcUrl" value="${url}"></property>

<property name="user" value="${username}"></property>

<property name="password" value="${password}"></property>

</bean>


<!-- 配置業務層類 -->

<bean id="accountService" class="cn.muke.spring.demo1.AccountServiceImpl">

<property name="accountDao" ref="accountDao"></property>

<!-- 注入事務管理的模板 -->

<property name="transactionTemplate" ref="transactionTemplate"></property>

</bean>


<!-- 配置dao類 -->

<bean id="accountDao" class="cn.muke.spring.demo1.AccountDaoImpl">

<property name="dataSource" ref="dataSource"></property>

</bean>


<!-- 配置事務管理器 -->

<bean id="transactionManager"

class="org.springframework.jdbc.datasource.DataSourceTransactionManager">

<property name="dataSource" ref="dataSource"></property>

</bean>


<!-- 配置事務管理的模板:spring為了簡化事務管理的代碼而提供的類 -->

<bean id="transactionTemplate"

class="org.springframework.transaction.support.TransactionTemplate">

<property name="transactionManager" ref="transactionManager"></property>

</bean>

</beans>


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

舉報

0/150
提交
取消

applicationContext.xml的時候沒有自動提示功能?

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

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

幫助反饋 APP下載

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

公眾號

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