使用android studio进行springboot项目的开发

B站视频

Step 1

Modify build.gradle

  1. Module Dir
apply plugin: 'org.springframework.boot'
apply plugin: 'java'


dependencies {
    implementation fileTree(dir: "libs", include: ["*.jar"])
    compile 'org.springframework.boot:spring-boot-starter:2.3.4.RELEASE'
    compile 'org.springframework.boot:spring-boot-starter-web:2.3.4.RELEASE'
}
  1. Project Dir
buildscript {
    ext {
        springBootVersion = '1.5.9.RELEASE'
    }
    repositories {
        mavenLocal()
        mavenCentral()
    }
    dependencies {
        classpath "org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}"
    }
}

allprojects {
    repositories {
        google()
        jcenter()
    }
}

task clean(type: Delete) {
    delete rootProject.buildDir
}

Step 2

  1. Rename Res dir And create application.properties
  2. delete useless files

Step 3

  1. Create Boot Point Class DemoApplication.java

  2. Create Control

  3. Boot And Test

  4. Package Jar

原文地址:https://www.cnblogs.com/songjianzaina/p/13915612.html