zoukankan      html  css  js  c++  java
  • gradle 4,构建java web程序

    在eclipse中,首先建一个gradle的工程,然后在工程上点击右键,properties,--》project facets,然后勾选Dynamic Web Module,Java,javascript。这三个。然后转换。再在gradle.build中修改如下,以下为完整代码。完毕后,在工程右键点击gradle,-->refresh,刷新即可让gradle下载类库。

    /*
     * This file was generated by the Gradle 'init' task.
     *
     * This generated file contains a sample Java Library project to get you started.
     * For more details take a look at the Java Libraries chapter in the Gradle
     * user guide available at https://docs.gradle.org/4.8.1/userguide/java_library_plugin.html
     */
     
    
    plugins {
        // Apply the java-library plugin to add support for Java Library
        id 'java-library'
        
    }
    
    dependencies {
     // struts library
        compile group: 'org.apache.struts', name: 'struts2-core', version: '2.3.24.1'
        compile 'org.apache.struts:struts2-spring-plugin:2.3.24.1'
        compile 'org.apache.struts:struts2-json-plugin:2.3.24.1'
     
        // spring library
        compile group: 'org.springframework', name: 'spring-core', version: '4.2.3.RELEASE'
        compile group: 'org.springframework', name: 'spring-web', version: '4.2.3.RELEASE'
        compile group: 'org.springframework', name: 'spring-orm', version: '4.2.3.RELEASE'
        compile group: 'org.springframework', name: 'spring-aop', version: '4.2.3.RELEASE'
        compile group: 'org.springframework', name: 'spring-aspects', version: '4.2.3.RELEASE'
        compile group: 'org.springframework', name: 'spring-jdbc', version: '4.2.3.RELEASE'
         
        // hibernate library  
        compile group: 'org.hibernate', name: 'hibernate-core', version: '5.0.1.Final'
         
        // common library
        compile 'org.slf4j:slf4j-api:1.7.13'
        testCompile 'junit:junit:4.12'
    
        // This dependency is exported to consumers, that is to say found on their compile classpath.
        api 'org.apache.commons:commons-math3:3.6.1'
    
        // This dependency is used internally, and not exposed to consumers on their own compile classpath.
        implementation 'com.google.guava:guava:23.0'
    
        // Use JUnit test framework
        testImplementation 'junit:junit:4.12'
    }
    
    // In this section you declare where to find the dependencies of your project
    repositories {
        // Use jcenter for resolving your dependencies.
        // You can declare any Maven/Ivy/file repository here.
        jcenter()
    }
  • 相关阅读:
    【tensorflow】神经网络的一些基本概念(前向传播、反向传播、损失函数、梯度下降法、学习率)和设计过程
    【opencv+python】图像的基本操作:缩放、剪切、位移、旋转、仿射变换
    【tensorflow】利用神经网络绘制股票价格拟合曲线
    Tuple
    2020-08-17T15:35:54.525+08:00
    FTP协议协议
    centos7常规系统指标监控shell脚本
    AWK传入shell变量举例
    洛谷-P5143 攀爬者
    洛谷-P1104 生日
  • 原文地址:https://www.cnblogs.com/sdgtxuyong/p/10339183.html
Copyright © 2011-2022 走看看