group 'com.ssm' version '1.0-SNAPSHOT' apply plugin: 'java' apply plugin: 'war' sourceCompatibility = 1.8 ext { //$spring_version 版本对应 spring_version = "4.3.14.RELEASE" } repositories { maven { url 'http://maven.aliyun.com/nexus/content/groups/public/' } mavenCentral() } dependencies { testCompile group: 'junit', name: 'junit', version: '4.11' // https://mvnrepository.com/artifact/org.springframework/spring-webmvc //springmvc + Spring Configuration compile "org.springframework:spring-web:$spring_version" compile "org.springframework:spring-webmvc:$spring_version" compile "org.springframework:spring-aop:$spring_version" compile "org.springframework:spring-aspects:$spring_version" compile "org.springframework:spring-beans:$spring_version" compile "org.springframework:spring-context:$spring_version" compile "org.springframework:spring-context-support:$spring_version" compile "org.springframework:spring-core:$spring_version" compile "org.springframework:spring-expression:$spring_version" compile "org.springframework:spring-jdbc:$spring_version" compile "org.springframework:spring-messaging:$spring_version" compile "org.springframework:spring-orm:$spring_version" compile "org.springframework:spring-tx:$spring_version" compile "org.springframework:spring-test:$spring_version" //MyBatis compile "org.mybatis:mybatis:3.4.1" //mybatis spring 插件 compile "org.mybatis:mybatis-spring:1.3.1"// https://mvnrepository.com/artifact/javax.servlet/jstl compile group: 'javax.servlet', name: 'jstl', version: '1.2' // 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/javax/javaee-api compile group: 'javax', name: 'javaee-api', version: '7.0' // https://mvnrepository.com/artifact/mysql/mysql-connector-java compile group: 'mysql', name: 'mysql-connector-java', version: '5.1.21' //公共资源包 compile "commons-logging:commons-logging:1.2" compile "commons-lang:commons-lang:2.6" compile "org.apache.commons:commons-collections4:4.0" compile "commons-beanutils:commons-beanutils:1.8.3" compile "commons-dbcp:commons-dbcp:1.4" compile "commons-pool:commons-pool:1.6" compile group: 'log4j', name: 'log4j', version: '1.2.17' }