Cloudera CDH/CDP 및 Hadoop EcoSystem, Semantic IoT등의 개발/운영 기술을 정리합니다. gooper@gooper.com로 문의 주세요.
* 참고 : http://iloveulhj.github.io/posts/java/java-commonsDBCP.html
-----------------------------DB설정 부분 -----------------------------
<?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:tx="http://www.springframework.org/schema/tx"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-4.0.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<bean id="dataSourceSpied" class="org.apache.commons.dbcp2.BasicDataSource" destroy-method="close" >
<property name="driverClassName" value="org.mariadb.jdbc.Driver"/>
<property name="url" value="jdbc:mariadb://db1:3306/sda"/>
<property name="username" value="계정명"/>
<property name="password" value="패스워드"/>
<property name="maxTotal" value="30" />
<property name="maxIdle" value="20" />
<property name="maxWaitMillis" value="-1" />
<property name="validationQuery" value="select 1" />
<property name="testOnBorrow" value="false" />
<property name="testWhileIdle" value="true" />
<property name="maxOpenPreparedStatements" value="10" />
<property name="poolPreparedStatements" value="true" />
<bean id="dataSource" class="net.sf.log4jdbc.Log4jdbcProxyDataSource">
<constructor-arg ref="dataSourceSpied" />
<property name="logFormatter">
<bean class="net.sf.log4jdbc.tools.Log4JdbcCustomFormatter">
<property name="loggingType" value="MULTI_LINE" />
<property name="sqlPrefix" value="SQL : "/>
</bean>
</property>
</bean>
<tx:annotation-driven transaction-manager="transactionManager" />
<bean id="transactionManager"
class="org.springframework.jdbc.datasource.DataSourceTransactionManager">
<property name="dataSource" ref="dataSource"></property>
</bean>
</beans>
댓글 0
번호 | 제목 | 날짜 | 조회 수 |
---|---|---|---|
601 | 부팅을 외장하드에서 하도록 변경하는 방법 | 2015.07.28 | 435 |
600 | pom.xml에서 build.gradle로 변환 | 2015.09.14 | 310 |
599 | mongodb 2.6.6 설치(64bit) | 2015.09.30 | 324 |
598 | SQL문장과 Mongo에서 사용하는 명령어를 비교한 것입니다. | 2015.09.30 | 327 |
597 | root계정으로 MariaDB설치후 mysql -u root -p로 db에 접근하여 바로 해줘야 하는일..(케릭터셑은 utf8) | 2015.10.02 | 552 |
596 | DB별 JDBC 드라이버 | 2015.10.02 | 467 |
595 | Mybatis foreach 문법정리(상황에 따른 사용법) | 2015.11.10 | 1465 |
594 | mybais #과 $의 차이점 | 2015.11.10 | 460 |
593 | Resource temporarily unavailable(자원이 일시적으로 사용 불가능함) 오류조치 | 2015.11.19 | 7708 |
592 | Runtime.getRuntime().exec(cmd) sample 소스 | 2015.11.19 | 359 |
591 | sparql에서 concat에제 | 2015.11.27 | 238 |
590 | 마이바티스(MyBatis)쿼리로그 출력및 정렬하기 | 2015.12.01 | 1546 |
589 | ontology, jena, sparql등 전반에 대한 설명및 예제를 제공하는 사이트 | 2015.12.08 | 490 |
588 | protege 4.3 다운로드 | 2015.12.09 | 227 |
587 | git설명 한글판 | 2015.12.09 | 440 |
586 | sparql 문법구조 설명 | 2015.12.09 | 490 |
585 | 대표 오픈소스 라이선스, 한 눈에 보기! | 2015.12.10 | 226 |
584 | 천문학적, 기후학적, 기상학적, 생물학적, 농사계절 구분 | 2015.12.16 | 191 |
583 | java quartz 시간 설정 참고사항 | 2015.12.16 | 300 |
582 | console명령과 API비교 | 2015.12.21 | 484 |