본문 바로가기

분류 전체보기116

메이븐 로컬저장소에 직접 등록 명령어 메이븐 중앙저장소에 없는 라이브러리는 로컬저장소에 직접 등록해주어야 하는데 로컬저장소에 등록하는 메이븐 명령어는 다음과 같다. mvn install:install-file -Dfile=C:\cos-26Dec2008\lib\cos.jar -DgroupId=com.servlets -DartifactId=cos -Dversion=26Dec2008 -Dpackaging=jar -DgeneratePom=true mvn install:install-file -Dfile=C:\ojdbc6.jar -DgroupId=com.oracle -DartifactId=ojdbc6 -Dversion=11.2.0.1.0 -Dpackaging=jar -DgeneratePom=true mvn install:install-file -Df.. 2016. 12. 14.
Spring ehcache 설정 Spring 4.3.3, Ehcache 2.10.3 버전 기준으로 자바 기반한 설정Ehcache와 관련된 스프링 설정부분만 다룬다.글 쓰는 시점에서는 Ehcache 3.1.3 버전이 나옴. 메이븐 pom.xmlnet.sf.ehcacheehcache2.10.3 스프링 설정import org.springframework.cache.CacheManager;import org.springframework.cache.annotation.EnableCaching;import org.springframework.cache.ehcache.EhCacheCacheManager;import org.springframework.cache.ehcache.EhCacheManagerFactoryBean;import org.spri.. 2016. 12. 12.
이클립스 Thymeleaf 플러그인 설치 이클립스 4.6.1 Neon 기준 Thymeleaf 플러그인 설치홈페이지 방문해서 직접 설치 가이드를 참고해도 된다.https://github.com/thymeleaf/thymeleaf-extras-eclipse-plugin 1. 설치상단메뉴 Help > Install New Software... > Work with 입력란에 http://www.thymeleaf.org/eclipse-plugin-update-site/ 입력 후 엔터 후 선택하여 설치 2. 설정HTML 파일 상단에 아래와 같이 입력프로젝트 마우스 오른쪽 버튼 클릭 > Thymeleaf > Add Thymeleaf Nature 선택이제 아래 사용법(영어)에 따라 코딩하면 된다.예) 3. Thymeleaf 사용법 URLhttp://www.t.. 2016. 10. 16.
Spring 4 자바 기반 Thymeleaf 설정 Spring 4.3.3 기준 Thymeleaf 3.0.2 설정 1. 메이븐 Thymeleaf 의존성 라이브러리 추가 org.thymeleaf thymeleaf-spring4 3.0.2.RELEASE 2. 스프링에 Thymeleaf 빈 설정 @Autowired private ApplicationContext applicationContext; @Bean public SpringResourceTemplateResolver templateResolver(){ SpringResourceTemplateResolver templateResolver = new SpringResourceTemplateResolver(); templateResolver.setApplicationContext(this.applicatio.. 2016. 10. 16.
Spring 4.3.2 log4jdbc-log4j2 설정 방법 1. pom.xml 자바 1.8 기준 메이븐 디펜던시 설정 org.bgee.log4jdbc-log4j2 log4jdbc-log4j2-jdbc4.1 1.16 2. DataSource 설정 DBCP는 HikariCP를 사용(자바 기반 설정) @Bean public DataSource dataSource() { HikariDataSource ds = new HikariDataSource(); ds.setMaximumPoolSize(20); ds.setDriverClassName("net.sf.log4jdbc.sql.jdbcapi.DriverSpy"); ds.setJdbcUrl("jdbc:log4jdbc:mariadb://localhost:3306/db"); ds.addDataSourceProperty("use.. 2016. 9. 29.
context.xml JNDI 설정 언제나 찾기에 여기에 적어두자. context.xml 파일을 웬만하면 프로젝트 webapps/META-INF 폴더 밑에 두자 그러면 WAS 의존성 없이 쓸 수 있다. 끝. 2016. 9. 29.