一gradle创建SSM项目——依赖包

build.gradle

compile:编译时必须.
runtime:运行时必须,包括编译时。
testCompile:测试编译时必须。
testRuntime:测试运行时必须,包括编译时。
注:此外配置依赖包,还可以模块化配置、导入list、配置是否传递等。

spring_version = "4.1.6.RELEASE"



 1 {
 2     //springmvc + Spring Configuration
 3     compile "org.springframework:spring-web:$spring_version"
 4     compile "org.springframework:spring-webmvc:$spring_version"
 5     compile "org.springframework:spring-aop:$spring_version"
 6     compile "org.springframework:spring-aspects:$spring_version"
 7     compile "org.springframework:spring-beans:$spring_version"
 8     compile "org.springframework:spring-context:$spring_version"
 9     compile "org.springframework:spring-context-support:$spring_version"
10     compile "org.springframework:spring-core:$spring_version"
11     compile "org.springframework:spring-expression:$spring_version"
12     compile "org.springframework:spring-jdbc:$spring_version"
13     compile "org.springframework:spring-messaging:$spring_version"
14     compile "org.springframework:spring-orm:$spring_version"
15     compile "org.springframework:spring-tx:$spring_version"
16     compile "org.springframework:spring-test:$spring_version"
17 
18     //MyBatis-plus (mybatis的增强版)
19     compile "com.baomidou:mybatis-plus:2.1.4"
20     compile group: 'org.apache.velocity', name: 'velocity', version: '1.7'
21 
22     //MySQL数据库驱动
23     compile "mysql:mysql-connector-java:5.1.23"
24 
25     //阿里巴巴 数据库连接池
26     compile "com.alibaba:druid:1.0.12"
27 
28     //json解析
29     compile "com.google.code.gson:gson:2.7"
30 
31     //fastjson springmvc 用他来为@ ResponseBody 注解的方法 , 返回 json
32     compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jackson_version
33     compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: jackson_version
34     compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jackson_version
35 
36     //日志文件管理包log4j
37     compile group: 'log4j', name: 'log4j', version: '1.2.17'
38     compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.24'
39     compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.24'
40 
41     //api文档 自动生成
42     compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.7.0'
43     compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.7.0'
44 
45     //servlet依赖
46     compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
47     compile group: 'javax.servlet', name: 'jsp-api', version: '2.0'
48 
49     //jstl标签库
50     compile "taglibs:standard:1.1.2"
51     compile "javax.servlet:jstl:1.2"
52 
53     //公共资源包
54     compile "commons-logging:commons-logging:1.2"
55     compile "commons-lang:commons-lang:2.6"
56     compile "org.apache.commons:commons-collections4:4.0"
57     compile "commons-beanutils:commons-beanutils:1.8.3"
58     compile "commons-dbcp:commons-dbcp:1.4"
59     compile "commons-pool:commons-pool:1.6"
60 
61     //文件上传
62     compile "commons-fileupload:commons-fileupload:1.3.1"
63     compile "commons-io:commons-io:2.4"
64 
65     //AspectJ(切点表达式)
66     compile "org.aspectj:aspectjrt:1.7.4"
67     compile "org.aspectj:aspectjweaver:1.7.4"
68 }

最后附一张build.gradle截图

 

转载于:https://www.cnblogs.com/Im-Victor/p/10857658.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值