java + mybatis + cubrid sample 본문

[PL]/JAVA

java + mybatis + cubrid sample

객과 함께. 2015. 2. 12. 13:17

출 처 : http://hmkcode.com/java-mybatis-mysql/

 

환경 : STS + JAVA 1.8 + MyBatis3.2.8 + CUBRID

( 위 출처의 환경이 아닌 작성자 환경 입니다. )

 

 

 [ config.xml ]

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE configuration
    PUBLIC "-//mybatis.org//DTD Config 3.0//EN" "http://mybatis.org/dtd/mybatis-3-config.dtd">

<configuration>
       <typeAliases>
             <typeAlias alias="Person" type="com.strSpring.vo.Person" />
        </typeAliases>

        <environments default="development">
                 <environment id="development">
                         <transactionManager type="JDBC" />
                         <!-- connecting to Local MySql -->
                         <dataSource type="POOLED">
                                   <property name="driver" value="cubrid.jdbc.driver.CUBRIDDriver" />
                                    <property name="url" value="jdbc:cubrid:localhost:33000:데이터베이스명으로 수정:::" />
                                    <property name="username" value="USER" />
                                    <property name="password" value="PASSWORD" />
                         </dataSource>
                  </environment>
       </environments>
        <mappers>
              <mapper resource="Person.xml" />
         </mappers>
</configuration>

 

■ MYSQL -> CUBRID 로 변경