Added Spring Boot extension
This commit is contained in:
parent
51a2cfee1c
commit
dff0d88182
5 changed files with 48 additions and 6 deletions
10
.idea/misc.xml
generated
10
.idea/misc.xml
generated
|
@ -1,3 +1,4 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
<project version="4">
|
<project version="4">
|
||||||
<component name="EntryPointsManager">
|
<component name="EntryPointsManager">
|
||||||
<entry_points version="2.0">
|
<entry_points version="2.0">
|
||||||
|
@ -18,6 +19,15 @@
|
||||||
<pattern value="com.example.springboot.HelloControllerIT" method="main" />
|
<pattern value="com.example.springboot.HelloControllerIT" method="main" />
|
||||||
</component>
|
</component>
|
||||||
<component name="PDMPlugin">
|
<component name="PDMPlugin">
|
||||||
|
<option name="customRuleSets">
|
||||||
|
<list>
|
||||||
|
<option value="K:\java\semver\config\pmd.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/../bld-exec/config/pmd.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/../bld-jacoco-report/config/pmd.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/../bld-checkstyle/config/pmd.xml" />
|
||||||
|
<option value="$PROJECT_DIR$/../bld-testng/config/pmd.xml" />
|
||||||
|
</list>
|
||||||
|
</option>
|
||||||
<option name="skipTestSources" value="false" />
|
<option name="skipTestSources" value="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="17" project-jdk-type="JavaSDK">
|
<component name="ProjectRootManager" version="2" languageLevel="JDK_17" project-jdk-name="17" project-jdk-type="JavaSDK">
|
||||||
|
|
15
.vscode/launch.json
vendored
15
.vscode/launch.json
vendored
|
@ -1,11 +1,24 @@
|
||||||
{
|
{
|
||||||
"version": "0.2.0",
|
"version": "0.2.0",
|
||||||
"configurations": [
|
"configurations": [
|
||||||
|
{
|
||||||
|
"type": "java",
|
||||||
|
"name": "Run Main",
|
||||||
|
"request": "launch",
|
||||||
|
"mainClass": "com.example.springboot.Application"
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"type": "java",
|
"type": "java",
|
||||||
"name": "Run Tests",
|
"name": "Run Tests",
|
||||||
"request": "launch",
|
"request": "launch",
|
||||||
"mainClass": "com.example.springboot.DemoApplicationTests"
|
"mainClass": "org.junit.platform.console.ConsoleLauncher",
|
||||||
|
"args": [
|
||||||
|
"--details=verbose",
|
||||||
|
"--scan-classpath",
|
||||||
|
"--disable-banner",
|
||||||
|
"--disable-ansi-colors",
|
||||||
|
"--exclude-engine=junit-platform-suite",
|
||||||
|
"--exclude-engine=junit-vintage"]
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
11
README.md
11
README.md
|
@ -1,6 +1,8 @@
|
||||||
# Spring Boot Example for [b<span style="color:orange">l</span>d](https://rife2.com/bld)
|
# Spring Boot Example for [b<span style="color:orange">l</span>d](https://rife2.com/bld)
|
||||||
|
|
||||||
Based on the Spring Guides' Spring Boot web application example. Please be sure to read the [guide](https://github.com/spring-guides/gs-spring-boot) for a sampling of how Spring Boot can help you accelerate application development
|
Based on the Spring Guides' Spring Boot web application example. Please be sure to read the
|
||||||
|
[guide](https://spring.io/guides/gs/spring-boot/) for a sampling of how Spring Boot can help
|
||||||
|
you accelerate application development
|
||||||
|
|
||||||
## Run the Application
|
## Run the Application
|
||||||
|
|
||||||
|
@ -31,3 +33,10 @@ To run the web application tests, issue the following command:
|
||||||
```
|
```
|
||||||
./bld test
|
./bld test
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## To create and launching the executable JAR
|
||||||
|
|
||||||
|
```
|
||||||
|
./bld jar
|
||||||
|
java -jar build/dist/demoapplication-0.1.0.jar
|
||||||
|
```
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
bld.downloadExtensionJavadoc=false
|
bld.downloadExtensionJavadoc=false
|
||||||
bld.downloadExtensionSources=true
|
bld.downloadExtensionSources=true
|
||||||
bld.extensions=
|
bld.extensions=com.uwyn.rife2:bld-spring-boot:0.9.0-SNAPSHOT
|
||||||
bld.repositories=MAVEN_CENTRAL,RIFE2_RELEASES
|
bld.repositories=MAVEN_LOCAL,MAVEN_CENTRAL,RIFE2_SNAPSHOTS,RIFE2_RELEASES
|
||||||
bld.downloadLocation=
|
bld.downloadLocation=
|
||||||
bld.sourceDirectories=
|
bld.sourceDirectories=
|
||||||
bld.version=1.7.5
|
bld.version=1.7.5
|
||||||
|
|
|
@ -1,12 +1,13 @@
|
||||||
package com.example.springboot;
|
package com.example.springboot;
|
||||||
|
|
||||||
|
import rife.bld.BuildCommand;
|
||||||
import rife.bld.WebProject;
|
import rife.bld.WebProject;
|
||||||
|
import rife.bld.extension.BootJarOperation;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
|
import static rife.bld.dependencies.Repository.MAVEN_CENTRAL;
|
||||||
import static rife.bld.dependencies.Scope.compile;
|
import static rife.bld.dependencies.Scope.*;
|
||||||
import static rife.bld.dependencies.Scope.test;
|
|
||||||
|
|
||||||
public class ApplicationBuild extends WebProject {
|
public class ApplicationBuild extends WebProject {
|
||||||
public ApplicationBuild() {
|
public ApplicationBuild() {
|
||||||
|
@ -29,9 +30,18 @@ public class ApplicationBuild extends WebProject {
|
||||||
.include(dependency("org.springframework.boot:spring-boot-starter-test:3.1.5"))
|
.include(dependency("org.springframework.boot:spring-boot-starter-test:3.1.5"))
|
||||||
.include(dependency("org.junit.jupiter:junit-jupiter:5.10.0"))
|
.include(dependency("org.junit.jupiter:junit-jupiter:5.10.0"))
|
||||||
.include(dependency("org.junit.platform:junit-platform-console-standalone:1.10.0"));
|
.include(dependency("org.junit.platform:junit-platform-console-standalone:1.10.0"));
|
||||||
|
scope(standalone)
|
||||||
|
.include(dependency("org.springframework.boot:spring-boot-loader:3.1.5"));
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void main(String[] args) {
|
public static void main(String[] args) {
|
||||||
new ApplicationBuild().start(args);
|
new ApplicationBuild().start(args);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@BuildCommand(summary = "Creates an executable JAR for the project")
|
||||||
|
public void jar() throws Exception {
|
||||||
|
new BootJarOperation()
|
||||||
|
.fromProject(this)
|
||||||
|
.execute();
|
||||||
|
}
|
||||||
}
|
}
|
Loading…
Add table
Add a link
Reference in a new issue