메뉴 건너뛰기

Bigdata, Semantic IoT, Hadoop, NoSQL

Bigdata, 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>

    

    <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>


번호 제목 글쓴이 날짜 조회 수
53 [gson]mongodb의 api를 이용하여 데이타를 가져올때 "com.google.gson.stream.MalformedJsonException: Unterminated object at line..." 오류발생시 조치사항 총관리자 2017.12.11 4383
52 Caused by: java.sql.SQLNonTransientConnectionException: Could not read resultset: unexpected end of stream, read 0 bytes from 4 오류시 확인/조치할 내용 총관리자 2016.10.31 3755
51 List<Map<String, String>>형태의 데이타에서 중복제거 하는 방법 총관리자 2016.12.23 1674
50 jsoup 사용 예제 총관리자 2014.06.06 1506
49 마이바티스(MyBatis)쿼리로그 출력및 정렬하기 총관리자 2015.12.01 1444
48 lagom-linux용 build.sbt파일 내용 총관리자 2017.10.12 1300
47 [ftgo_application]Unable to infer base url오류 발생시 조치방법 gooper 2023.02.20 1243
46 Mybatis foreach 문법정리(상황에 따른 사용법) 총관리자 2015.11.10 1143
» mybatis와 spring을 org.apache.commons.dbcp2.BasicDataSource의 DataSource로 연동할때 DB설정(참고) 총관리자 2016.10.31 990
44 [Mybatis]Spring과 연동하지 않고 Java+Mybatis 형태의 프로그램 샘플소스 총관리자 2016.09.01 805
43 python test.py실행시 "ImportError: No module named pyspark" 혹은 "ImportError: No module named py4j.protocol"등의 오류 발생시 조치사항 총관리자 2017.07.04 764
42 [springframework]Caused by: org.mariadb.jdbc.internal.util.dao.QueryException: Could not read resultset: unexpected end of stream, read 0 bytes from 4 오류 발생시 조치사항 총관리자 2017.01.23 680
41 AIX 7.1에 Python 2.7.11설치하기 총관리자 2016.10.06 651
40 초기 오류(java.lang.NoSuchMethodError)에 따른 후속 작업에서 오류(java.lang.NoClassDefFoundError)가 발생되는 상황(quartz에서 주기적으로 작업시) 총관리자 2016.08.29 591
39 servlet-api를 jar형태로 build할때 포함하지 말고 java 설치 위치의 jre/lib/ext에 복사하여 사용하는것이 좋다. 총관리자 2016.08.10 445
38 Eclipse실행시 Java was started but returned exit code=1이라는 오류가 발생할때 조치방법 총관리자 2016.11.07 397
37 embedded-cassandra의 data 저장위치 총관리자 2019.06.09 336
36 VisualVM 1.3.9을 이용한 JVM 모니터링 file 총관리자 2016.10.27 332
35 python2.7.4에서 Oracle DB(11.2)를 사용하기 위한 설정(RPM을 이용하여 RHEL 7.4에 설치) 총관리자 2021.11.26 331
34 [tomcat] logrotate를 이용하여 catalina.out로그파일 일별로 로테이션 저장하기 file 총관리자 2017.01.18 318

A personal place to organize information learned during the development of such Hadoop, Hive, Hbase, Semantic IoT, etc.
We are open to the required minutes. Please send inquiries to gooper@gooper.com.

위로