IDEA创建Gradle项目

IDEA创建Gradle项目

工程截图如下
在这里插入图片描述

build.gradle

plugins {
   
    id 'java'
    id 'war'
}

group 'org.ppl'
version '1.0-SNAPSHOT'

repositories {
   
    mavenCentral()
}

dependencies {
   

    implementation 'org.springframework:spring-beans:5.3.22'
    implementation 'org.springframework:spring-web:5.3.22'
    implementation 'org.springframework:spring-webmvc:5.3.22'
    implementation 'org.springframework:spring-tx:5.3.22'
    implementation 'org.springframework:spring-test:5.3.22'
    implementation 'org.springframework:spring-jdbc:5.3.22'

    implementation 'org.mybatis:mybatis-spring:2.0.7'
    implementation 'org.mybatis:mybatis:3.5.6'

    implementation 'mysql:mysql-connector-java:5.1.36'
    implementation 'com.alibaba:druid:1.2.11'

    implementation 'com.fasterxml.jackson.core:jackson-databind:2.13.3'
    implementation 'com.fasterxml.jackson.core:jackson-annotations:2.13.3'
    implementation 'com.fasterxml.jackson.core:jackson-core:2.13.3'

    implementation 'org.aspectj:aspectjweaver:1.9.9.1'
    implementation 'log4j:log4j:1.2.17'
    implementation 'org.slf4j:slf4j-api:2.0.0'
    implementation 'jstl:jstl:1.2'
    compileOnly 'javax.servlet:servlet-api:2.5'
    // Gradle 对于 Junit4.x 支持
    //testImplementation group: 'junit' ,name: 'junit', version: '4.12'
    // Gradle 对于 Junit5.x 版本支持
    testImplementation 'org.junit.jupiter:junit-jupiter-api:5.9.0'
    testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.9.0'
}

test {
   

    // Gradle 对于 Junit4.x 支持
    //useJUnit()

    // Gradle 对于 Junit5.x 版本支持
    useJUnitPlatform()
}

task createDirs {
   
    sourceSets*.java.srcDirs*.each {
   
        it.mkdirs()
    }
    sourceSets*.resources.srcDirs*.each{
   
        it.mkdirs()
    }
}

web.xml

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4"
         xmlns="http://java.sun.com/xml/ns/j2ee
  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值