Gradle compile:
如果你的jar包/依賴代碼 在編譯的時候需要依賴,在運行的時候也需要,那麼就用compile
例如 :
compile ‘org.springframework.boot:spring-boot-starter-websocket:1.1.6.RELEASE’
Gradle providedCompile:
如果你的jar包/依賴代碼 僅在編譯的時候需要,但是在運行時不需要依賴,就用providedCompile
例如:
providedCompile 'org.springframework.boot:spring-boot-starter-tomcat:1.1.6.RELEASE'