// Java와 웹 애플리케이션(WAR) 빌드를 위한 플러그인 설정 apply plugin: 'java' apply plugin: 'war' // 내장 웹서버(jetty)를 사용하기 위한 플러그인 apply plugin: 'jetty' // 소스 코드의 Java 버전을 1.7로 지정 sourceCompatibility = 1.7 targetCompatibility = 1.7 // UTF-8 인코딩 설정 [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' // 라이브러리를 다운로드할 저장소 지정 repositories { mavenCentral() } // 프로젝트에 필요한 라이브러리(의존성) 목록 dependencies { // 1. Spring Framework 3.1.4 버전으로 변경 compile 'org.springframework:spring-webmvc:3.1.4.RELEASE' compile 'org.springframework:spring-orm:3.1.4.RELEASE' // 2. Hibernate compile 'org.hibernate:hibernate-core:4.3.11.Final' compile 'org.hibernate:hibernate-entitymanager:4.3.11.Final' // @Transactional을 위한 CGLIB 라이브러리 compile 'cglib:cglib-nodep:2.2.2' // JSP와 Servlet API (실제 서버에 이미 있으므로 컴파일 시에만 필요) providedCompile 'javax.servlet:servlet-api:2.5' providedCompile 'javax.servlet.jsp:jsp-api:2.1' // JSTL (JSP에서 유용한 태그 라이브러리) compile 'javax.servlet:jstl:1.2' // HTTP 요청을 위한 Apache HttpClient compile 'org.apache.httpcomponents:httpclient:4.3.4' // SHA-256 해시 생성을 위한 Apache Commons Codec compile 'commons-codec:commons-codec:1.9' // PostgreSQL 14+ 버전을 지원하는 최신 JDBC 드라이버로 변경 compile 'org.postgresql:postgresql:42.7.3' // 데이터베이스 커넥션 풀을 위한 C3P0 compile 'c3p0:c3p0:0.9.1.2' // ---------------------------- } // Jetty 서버 포트를 8080으로 설정 httpPort = 8083