为了账号安全,请及时绑定邮箱和手机立即绑定

gradle provided和compile的区别

gradle provided和compile的区别

HUX布斯 2018-12-31 16:00:41
查看完整描述

1 回答

?
慕村225694

TA贡献1880条经验 获得超4个赞

gradle provided和compile的区别在于使用providedCompile的前提是apply plugin: 'war'

1、Gradle compile:

假如你的jar包存在代码依赖性,在编译、运行时候需要依赖代码,那就用compile

例如 :

compile 'org.springframework.boot:spring'

2、Gradle providedCompile:

假如你的jar包存在代码依赖性,但是在编译的时候才用得上,而运行时不需要,就用providedCompile

例如:

providedCompile 'org.springframework.boot:spring'


查看完整回答
反对 回复 2019-01-15
  • 1 回答
  • 0 关注
  • 736 浏览

添加回答

举报

0/150
提交
取消
微信客服

购课补贴
联系客服咨询优惠详情

帮助反馈 APP下载

慕课网APP
您的移动学习伙伴

公众号

扫描二维码
关注慕课网微信公众号