zoukankan      html  css  js  c++  java
  • idea配置gradel+spring boot

    idea 修改 setting-gradel

    build.gradel文件配置

    // buildscript必须在顶部,注意位置
    buildscript {
        repositories {
            // 优先使用国内源
            maven { url 'https://maven.aliyun.com/repository/public' }
            mavenCentral()
        }
        dependencies {
            // 让spring-boot支持gradle
            classpath("org.springframework.boot:spring-boot-gradle-plugin:2.1.1.RELEASE")
        }
    }
    plugins {
        id 'java'
        id 'org.springframework.boot' version '2.1.1.RELEASE'
    
    }
    apply plugin: 'java'
    apply plugin: 'idea'
    // 使用spring boot
    apply plugin: "org.springframework.boot"
    // 使用spring boot的自动依赖管理
    apply plugin: 'io.spring.dependency-management'
    
    group 'com.genew.nuas'
    version '1.0-SNAPSHOT'
    
    //指定java版本
    sourceCompatibility = 1.8
    targetCompatibility = 1.8
    
    repositories {
        // 使用国内的源
        maven { url 'https://maven.aliyun.com/repository/public' }
        mavenCentral()
    }
    
    //依赖列表
    dependencies {
        compile 'org.springframework.boot:spring-boot-starter-web'
        testCompile 'org.springframework.boot:spring-boot-starter-test'
        testCompile group: 'junit', name: 'junit', version: '4.12'
    }

    加上spring boot 就可以启动一个简单的spring boot的项目了

    积极向上,奋发图强,向着哪个目标前进。
  • 相关阅读:
    小数化分数2
    Sum of divisors
    Subsequence
    Lowest Bit
    Specialized Four-Digit Numbers
    Hunters
    Pet
    测试你是否和LTC水平一样高
    Bank Interest
    bzoj 1295
  • 原文地址:https://www.cnblogs.com/wzq-xf/p/11906634.html
Copyright © 2011-2022 走看看