Simplest SpringBoot Project Example
Jump to navigation
Jump to search
Internal
Overview
Also see:
Example
settings.gradle
rootProject.name = 'simplest-spring-boot-example'
build.gradle
buildscript {
ext {
springBootVersion = '2.0.5.RELEASE'
}
repositories {
mavenCentral()
}
dependencies {
classpath("org.springframework.boot:spring-boot-gradle-plugin:${springBootVersion}")
}
}
apply plugin: 'java'
apply plugin: 'eclipse'
apply plugin: 'org.springframework.boot'
apply plugin: 'io.spring.dependency-management'
group = 'playground.simplest.springboot'
version = '0.0.1'
sourceCompatibility = 8
repositories {
mavenCentral()
}
dependencies {
implementation('org.projectlombok:lombok:1.18.2')
implementation('org.springframework.boot:spring-boot-starter')
}
Main Class
...
@SpringBootApplication
public class MainApplication {
public static void main(String[] args) throws Exception {
SpringApplication.run(MainApplication.class, args);
}
}
More details: