《一gradle創(chuàng)建SSM項目——依賴包》

build.gradle

compile:編譯時必須.
runtime:運行時必須糖耸,包括編譯時。
testCompile:測試編譯時必須焕盟。
testRuntime:測試運行時必須铝阐,包括編譯時。
注:此外配置依賴包删壮,還可以模塊化配置斩启、導(dǎo)入list、配置是否傳遞等醉锅。

spring_version = "4.1.6.RELEASE"

{
    //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-plus (mybatis的增強版)
    compile "com.baomidou:mybatis-plus:2.1.4"
    compile group: 'org.apache.velocity', name: 'velocity', version: '1.7'

    //MySQL數(shù)據(jù)庫驅(qū)動
    compile "mysql:mysql-connector-java:5.1.23"

    //阿里巴巴 數(shù)據(jù)庫連接池
    compile "com.alibaba:druid:1.0.12"

    //json解析
    compile "com.google.code.gson:gson:2.7"

    //fastjson springmvc 用他來為@ ResponseBody 注解的方法 兔簇, 返回 json
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-databind', version: jackson_version
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-core', version: jackson_version
    compile group: 'com.fasterxml.jackson.core', name: 'jackson-annotations', version: jackson_version

    //日志文件管理包log4j
    compile group: 'log4j', name: 'log4j', version: '1.2.17'
    compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.24'
    compile group: 'org.slf4j', name: 'slf4j-log4j12', version: '1.7.24'

    //api文檔 自動生成
    compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.7.0'
    compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.7.0'

    //servlet依賴
    compile group: 'javax.servlet', name: 'javax.servlet-api', version: '3.1.0'
    compile group: 'javax.servlet', name: 'jsp-api', version: '2.0'

    //jstl標簽庫
    compile "taglibs:standard:1.1.2"
    compile "javax.servlet:jstl:1.2"

    //公共資源包
    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 "commons-fileupload:commons-fileupload:1.3.1"
    compile "commons-io:commons-io:2.4"

    //AspectJ(切點表達式)
    compile "org.aspectj:aspectjrt:1.7.4"
    compile "org.aspectj:aspectjweaver:1.7.4"
}

最后附一張build.gradle截圖

上傳圖片edge不行!要用chrome!
最后編輯于
?著作權(quán)歸作者所有,轉(zhuǎn)載或內(nèi)容合作請聯(lián)系作者
  • 序言:七十年代末,一起剝皮案震驚了整個濱河市垄琐,隨后出現(xiàn)的幾起案子边酒,更是在濱河造成了極大的恐慌,老刑警劉巖狸窘,帶你破解...
    沈念sama閱讀 222,865評論 6 518
  • 序言:濱河連續(xù)發(fā)生了三起死亡事件墩朦,死亡現(xiàn)場離奇詭異,居然都是意外死亡翻擒,警方通過查閱死者的電腦和手機氓涣,發(fā)現(xiàn)死者居然都...
    沈念sama閱讀 95,296評論 3 399
  • 文/潘曉璐 我一進店門,熙熙樓的掌柜王于貴愁眉苦臉地迎上來陋气,“玉大人劳吠,你說我怎么就攤上這事」茫” “怎么了痒玩?”我有些...
    開封第一講書人閱讀 169,631評論 0 364
  • 文/不壞的土叔 我叫張陵,是天一觀的道長议慰。 經(jīng)常有香客問我蠢古,道長,這世上最難降的妖魔是什么别凹? 我笑而不...
    開封第一講書人閱讀 60,199評論 1 300
  • 正文 為了忘掉前任草讶,我火速辦了婚禮,結(jié)果婚禮上炉菲,老公的妹妹穿的比我還像新娘堕战。我一直安慰自己,他們只是感情好颁督,可當我...
    茶點故事閱讀 69,196評論 6 398
  • 文/花漫 我一把揭開白布。 她就那樣靜靜地躺著浇雹,像睡著了一般沉御。 火紅的嫁衣襯著肌膚如雪。 梳的紋絲不亂的頭發(fā)上昭灵,一...
    開封第一講書人閱讀 52,793評論 1 314
  • 那天吠裆,我揣著相機與錄音,去河邊找鬼烂完。 笑死试疙,一個胖子當著我的面吹牛,可吹牛的內(nèi)容都是我干的抠蚣。 我是一名探鬼主播祝旷,決...
    沈念sama閱讀 41,221評論 3 423
  • 文/蒼蘭香墨 我猛地睜開眼,長吁一口氣:“原來是場噩夢啊……” “哼!你這毒婦竟也來了怀跛?” 一聲冷哼從身側(cè)響起距贷,我...
    開封第一講書人閱讀 40,174評論 0 277
  • 序言:老撾萬榮一對情侶失蹤,失蹤者是張志新(化名)和其女友劉穎吻谋,沒想到半個月后忠蝗,有當?shù)厝嗽跇淞掷锇l(fā)現(xiàn)了一具尸體,經(jīng)...
    沈念sama閱讀 46,699評論 1 320
  • 正文 獨居荒郊野嶺守林人離奇死亡漓拾,尸身上長有42處帶血的膿包…… 初始之章·張勛 以下內(nèi)容為張勛視角 年9月15日...
    茶點故事閱讀 38,770評論 3 343
  • 正文 我和宋清朗相戀三年阁最,在試婚紗的時候發(fā)現(xiàn)自己被綠了。 大學(xué)時的朋友給我發(fā)了我未婚夫和他白月光在一起吃飯的照片骇两。...
    茶點故事閱讀 40,918評論 1 353
  • 序言:一個原本活蹦亂跳的男人離奇死亡速种,死狀恐怖,靈堂內(nèi)的尸體忽然破棺而出脯颜,到底是詐尸還是另有隱情哟旗,我是刑警寧澤,帶...
    沈念sama閱讀 36,573評論 5 351
  • 正文 年R本政府宣布栋操,位于F島的核電站闸餐,受9級特大地震影響,放射性物質(zhì)發(fā)生泄漏矾芙。R本人自食惡果不足惜舍沙,卻給世界環(huán)境...
    茶點故事閱讀 42,255評論 3 336
  • 文/蒙蒙 一、第九天 我趴在偏房一處隱蔽的房頂上張望剔宪。 院中可真熱鬧拂铡,春花似錦、人聲如沸葱绒。這莊子的主人今日做“春日...
    開封第一講書人閱讀 32,749評論 0 25
  • 文/蒼蘭香墨 我抬頭看了看天上的太陽地淀。三九已至失球,卻和暖如春,著一層夾襖步出監(jiān)牢的瞬間帮毁,已是汗流浹背实苞。 一陣腳步聲響...
    開封第一講書人閱讀 33,862評論 1 274
  • 我被黑心中介騙來泰國打工, 沒想到剛下飛機就差點兒被人妖公主榨干…… 1. 我叫王不留烈疚,地道東北人黔牵。 一個月前我還...
    沈念sama閱讀 49,364評論 3 379
  • 正文 我出身青樓,卻偏偏與公主長得像爷肝,于是被迫代替她去往敵國和親猾浦。 傳聞我的和親對象是個殘疾皇子陆错,可洞房花燭夜當晚...
    茶點故事閱讀 45,926評論 2 361

推薦閱讀更多精彩內(nèi)容