使用android studio进行springboot项目的开发
Step 1
Modify build.gradle
- 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'
}
- 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
- Rename Res dir And create application.properties
- delete useless files
Step 3
-
Create Boot Point Class DemoApplication.java
-
Create Control
-
Boot And Test
-
Package Jar