spring10 스프링 마이바티스 pom.xml oracle ORACLE JDBC Repository http://maven.jahia.org/maven2 com.oracle ojdbc6 12.1.0.1 org.springframework spring-jdbc 4.1.4.RELEASE org.mybatis mybatis 3.2.8 org.mybatis mybatis-spring 1.2.2 servlet-context.xml 실행할 sql 명령이 저장된 xml 파일의 namespace에는 반드시 mapper 역할을 하는 인터페이스의 이름을 풀 패키지 이름과 같이 적어야 한다. 컨트롤러에 아래의 내용을 코딩한다. sqlSession에는 스프링이 알아서 servlet-context.xml에서 선언된 mybatis mapper를 선언한 SqlS.. 2024. 3. 22. 스프링 security 시큐리티 보안 web.xml에 한글 깨짐 방지 필터 추가 encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 forceEncoding true encodingFilter /* ============================================================================================== spring 버전 3.2.5로 변경 pom.xml 파일 첫 줄 에러 수정 3.1.1 pom.xml에 security dependency 추가 org.springframework.security spring-security-config 3.2.5.RELEASE org.springfr.. 2024. 3. 21. 스프링 트랙잭션 모음 템플릿 트랙잭션 전파 2024. 3. 21. 스프링 트랙잭션 설정하기 ============================================================================================== DAO 클래스에 DBCPTemplate 객체 추가 // DBCPTemplate 객체 JdbcTemplate template; public void setTemplate(JdbcTemplate template) { this.template = template; } DAO 클래스에 PlatformTransactionManager 객체 추가 // 트랜잭션 객체 PlatformTransactionManager transactionManager; public void setTransactionManager(PlatformTransactionMan.. 2024. 3. 21. 스프링 템플릿 web.xml에 한글 깨짐 방지 필터 추가 encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 forceEncoding true encodingFilter /* ============================================================================================== pom.xml 파일 첫 줄 에러 수정 3.1.1 pom.xml에 oracle repository와 dependency 추가 oracle ORACLE JDBC Repository http://maven.jahia.org/maven2 org.springframework spring-j.. 2024. 3. 20. 스프링 spring template 템플릿 세팅 pom.xml의 태그 위에 오라클 외부 저장소 설정을 추가한다. oracle ORACLE JDBC Repository http://maven.jahia.org/maven2 pom.xml의 태그에 아래의 dependency를 맨 끝에 추가한다. com.oracle ojdbc6 12.1.0.1 org.springframework spring-jdbc 4.1.4.RELEASE ======================================================================================================= servlet-context.xml에 dbcp template을 사용하기 위한 bean을 추가한다. =============================.. 2024. 3. 19. 스프링 DB설정 파일 Servers 폴더의 context.xml에 아래의 내용을 복사해 넣는다. pom.xml oracle ORACLE JDBC Repository http://maven.jahia.org/maven2 mysql mysql-connector-java 5.1.39 com.oracle ojdbc6 12.1.0.1 org.springframework spring-jdbc 4.1.4.RELEASE web.xml DB Connection jdbc/mysql javax.sql.DataSource Container DB Connection jdbc/oracle javax.sql.DataSource Container DAO 클래스에 아래의 내용을 코딩한다. DataSource dataSource; public Mvcboar.. 2024. 3. 18. 스프링 한글깨짐 방지 필터 web.xml 태그 내부에 아래 내용을 추가한다. encodingFilter org.springframework.web.filter.CharacterEncodingFilter encoding UTF-8 forceEncoding true encodingFilter /* 2024. 3. 15. 스프링 properties 파일 한글 깨짐 해결방법 2024. 3. 14. 이전 1 2 다음