일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | |
7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 | 15 | 16 | 17 | 18 | 19 | 20 |
21 | 22 | 23 | 24 | 25 | 26 | 27 |
28 | 29 | 30 |
- MySQL
- spring
- oracle
- Open Source
- 설정
- Core Java
- JDBC
- git
- Eclipse
- Docker
- AJAX
- jpa
- JavaScript
- STS
- Tomcat
- maven
- Python
- Thymeleaf
- SpringBoot
- IntelliJ
- 오픈소스
- ubuntu
- Spring Boot
- Exception
- MSSQL
- 문서
- PostgreSQL
- Source
- myBatis
- error
- Today
- Total
목록myBatis (17)
헤르메스 LIFE
Spring 기반의 MyBatis 환경을 구축해보려 합니다.이미 구축되어 있는 셈플이 있나 찾아봤더니 있네요.. ^^*JPetStore 쇼핑몰.. (개인적인 생각으로는 쇼핑몰 셈플의 기본이라고 생각합니다.) 그럼 환경을 구축해봐야죠.. * 설치 파일들 목록Spring 3.0.5mybatis-3.0.6.jarslf4j-api-1.5.10.jarmysql-connector-java-5.1.20.jar Eclipse-jee-indigo-SR2-win32-x86_64.zipapache-tomcat-6.0.32-windows-x64.zipjdk-6u32-windows-x64.exemysql-5.5.24-winx64.zip mybatis-jpetstore-6.0.1-bundle.zip 파일을 다운 받습니다. ( h..
Home page : http://code.google.com/p/mybatis/
출처 : https://mybatis.org/mybatis-3/ko/configuration.html MyBatis – 마이바티스 3 | 매퍼 설정 매퍼 설정 마이바티스 XML 설정파일은 다양한 설정과 프로퍼티를 가진다. 문서의 구조는 다음과 같다.: configuration properties 이 설정은 외부에 옮길 수 있다. 자바 프로퍼티 파일 인스턴스에 설정할 mybatis.org 런타임시 MyBatis의 행위를 조정하기 위한 중요한 값들이다. 다음표는 셋팅과 그 의미 그리고 디폴트 값을 설명한다. 설정설명사용가능한 값들디폴트 cacheEnabled 설정에서 각 매퍼에 설정된 캐시를 전역적으로 사용할지 말지에 대한 여부 true | false true lazyLoadingEnabled 지연로딩을 사..
원문 : http://blog.idleworx.com/2010/06/initialize-mybatis-servletcontextlisten.html In order to initialize MyBatis 3.0.1 and make it available to your java web application your can use a ServletContextListener to set the sqlSessionFactory as an application context attribute.(MyBatis 3.0.1을 초기화하고, 애플리케이션 컨텍스트 속성에 SqlSessionFactory 설정하기 위해, ServletContextListener 사용하여 자바 웹 애플리케이션이 사용할 수 있도록 합니다.)Th..
원문 : http://sidnancy.kr/archives/216 Spring + MyBatis 사용을 할 때 아래와 같이 복수의 DB에 접근해야 되는 경우가 있을 수 있다. 이런 경우 스프링에서 제공하는 IsolationLevelDataSourceRouter을 사용할 경우 해결이 되겠지만 이 경우 Datasource 설정을 Dao별로 분리해야 하고, Class 단위 별로 설정해야 되므로 Read-Write Logic을 분리해야 해서 약간 불편한 점이 있다.그래서 annotation 을 사용하여 method별로 datasource를 분리할 수 있는 방법을 고민하다가 AbstractRoutingDataSource을 상속받아 직접 구현하는 방식을 택하게 되었다. 먼저 아래와 같은 DataSource 설정이 ..
applicationContext-datasource.xml SampleServiceResourceImpl.java @RequestMapping("/category") @Controller public class SampleServiceResourceImpl extends BaseServiceResource implements SampleServiceResource { @Autowired private SampleBiz sampleBiz; @RequestMapping(value = "/samples/tx01", method = RequestMethod.POST) public ModelAndView txSample01(@RequestBody SampleVO sampleVO) throws Exception ..
web.xml contextConfigLocation classpath:/spring/applicationContext-*.xml rest org.springframework.web.servlet.DispatcherServlet contextConfigLocation /WEB-INF/spring/config/servlet-*.xml 1 applicationContext-resource.xml applicationConfig.xml core.log.jdbc.driver.MysqlDriver jdbc:mysql://localhost:3309/springdb scott tiger applicationContext-datasource.xml mybatisConfig.xml https://hermeslog.tis..