Reworked to use the Spring Guides' Spring Boot web application example

This commit is contained in:
Erik C. Thauvin 2023-10-22 22:06:49 -07:00
parent 33984c4c0d
commit 3385b72fb5
14 changed files with 143 additions and 72 deletions

View file

@ -0,0 +1,37 @@
package com.example.springboot;
import rife.bld.BaseProject;
import java.util.List;
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
import static rife.bld.dependencies.Scope.compile;
import static rife.bld.dependencies.Scope.test;
public class ApplicationBuild extends BaseProject {
public ApplicationBuild() {
pkg = "com.example.demo";
name = "DemoApplication";
mainClass = "com.example.springboot.Application";
version = version(0, 1, 0);
repositories = List.of(MAVEN_CENTRAL);
scope(compile)
.include(dependency("org.springframework.boot", "spring-boot-starter",
version(3, 1, 5)))
.include(dependency("org.springframework.boot", "spring-boot-starter-actuator",
version(3, 1, 5)))
.include(dependency("org.springframework.boot", "spring-boot-starter-web",
version(3, 1, 5)));
scope(test)
.include(dependency("org.springframework.boot", "spring-boot-starter-test",
version(3, 1, 5)));
testOperation().mainClass("com.example.springboot.HelloControllerIT");
}
public static void main(String[] args) {
new ApplicationBuild().start(args);
}
}