[Spring] 사무 관리 (데이터 원본) 설정
프로필
<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:tx="http://www.springframework.org/schema/tx"
xmlns:aop="http://www.springframework.org/schema/aop"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.2.xsd
http://www.springframework.org/schema/context
http://www.springframework.org/schema/context/spring-context-3.2.xsd
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx-3.2.xsd
http://www.springframework.org/schema/aop
http://www.springframework.org/schema/aop/spring-aop-3.2.xsd">
<bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
<property name="driverClassName" value="com.mysql.jdbc.Driver">property>
<property name="url" value="jdbc:mysql://localhost:3306/spring3.2_10">property>
<property name="username" value="root">property>
<property name="password" value="root">property>
<property name="initialSize" value="1">property>
<property name="maxActive" value="5">property>
<property name="maxIdle" value="2">property>
<property name="minIdle" value="1">property>
bean>
<bean id="orderDao" class="com.daoimpl.OrderDaoImpl">
<property name="dataSource" ref="dataSource">property>
bean>
<bean id="detailDao" class="com.daoimpl.DetailDaoImpl">
<property name="dataSource" ref="dataSource">property>
bean>
<bean id="orderService" class="com.serviceimpl.OrderServiceImpl">
<property name="orderDao" ref="orderDao">property>
<property name="detailDao" ref="detailDao">property>
<property name="detailService" ref="detailService">property>
bean>
<bean id="detailService" class="com.serviceimpl.DetailServiceImpl">
<property name="detailDao" ref="detailDao">property>
bean>
<bean id="txManager" class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource">property>
bean>
<tx:advice id="txAdvice" transaction-manager="txManager">
<tx:attributes>
<tx:method name="save*" propagation="REQUIRED"/>
<tx:method name="update*" propagation="REQUIRED"/>
<tx:method name="query*" read-only="true"/>
tx:attributes>
tx:advice>
<aop:config>
<aop:pointcut expression="execution(* com.serviceimpl..*.*(..))" id="mycut"/>
<aop:advisor advice-ref="txAdvice" pointcut-ref="mycut"/>
aop:config>
beans>
``
``
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
ssm에서 ansible 해 본 메모 (그냥 메모)SSM EC2에 SSM 에이전트를 넣고 EC2를 SSM의 관리하에 놓습니다. SSM 관리형 인스턴스에서 볼 수 있다면 OK 참고 링크 S3 버킷 생성 Ansible 템플릿을 zip으로 만들어 S3에 배치하기 위해. ...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.