说句实话,很久都没使用SSH开发项目了,但是出于各种原因,再次记录一下整合方式,纯注解零配置。
gradle配置文件:
group 'com.bdqn.lyrk.ssh.study' version '1.0-SNAPSHOT' apply plugin: 'war' repositories { mavenLocal() mavenCentral() } dependencies { // https://mvnrepository.com/artifact/org.apache.struts/struts2-core compile group: 'org.apache.struts', name: 'struts2-core', version: '2.5.14.1' // https://mvnrepository.com/artifact/org.apache.struts/struts2-spring-plugin compile group: 'org.apache.struts', name: 'struts2-spring-plugin', version: '2.5.14.1' // https://mvnrepository.com/artifact/org.springframework/spring-context compile group: 'org.springframework', name: 'spring-context', version: '5.0.4.RELEASE' // https://mvnrepository.com/artifact/org.springframework/spring-web compile group: 'org.springframework', name: 'spring-web', version: '5.0.4.RELEASE' // https://mvnrepository.com/artifact/org.hibernate/hibernate-core compile group: 'org.hibernate', name: 'hibernate-core', version: '5.2.12.Final' // https://mvnrepository.com/artifact/org.hibernate/hibernate-validator compile group: 'org.hibernate', name: 'hibernate-validator', version: '5.4.1.Final' // https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0' // https://mvnrepository.com/artifact/org.springframework/spring-orm compile group: 'org.springframework', name: 'spring-orm', version: '5.0.4.RELEASE' // https://mvnrepository.com/artifact/org.springframework/spring-tx compile group: 'org.springframework', name: 'spring-tx', version: '5.0.4.RELEASE' // https://mvnrepository.com/artifact/com.zaxxer/HikariCP compile group: 'com.zaxxer', name: 'HikariCP', version: '2.7.4' // https://mvnrepository.com/artifact/org.apache.struts/struts2-convention-plugin compile group: 'org.apache.struts', name: 'struts2-convention-plugin', version: '2.5.14.1' testCompile group: 'junit', name: 'junit', version: '4.11' }