Spring DataSource를 JNDI 방식으로 변경

  • intersection3
    (동교동삼거리)
  • intersection3's Avatar 이 글의 작성자
  • Offline
  • ★ Tech Writer ★
  • ★ Tech Writer ★
더보기
21 Jun 2016 23:06 - 21 Jun 2016 23:06 #847 작성자: intersection3
intersection3 님의 글: Spring DataSource를 JNDI 방식으로 변경
변경 전
    <bean id="dataSource" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close">
        <property name="driverClassName" value="org.mariadb.jdbc.Driver"/>
        <property name="url" value="jdbc:mysql://10.10.10.10:3306/test"/>
        <property name="username" value="test"/>
        <property name="password" value="xptmxm"/>
    </bean>

변경 후
    <bean id="dataSource" class="org.springframework.jndi.JndiObjectFactoryBean">
        <property name="jndiName" value="java:/comp/env/jdbc/test" />
    </bean>
Time to create page: 0.056 seconds
Powered by Kunena Forum