A clean Spring Boot starter project for learning and sharing.
- A proper Spring Boot entry point
- A separate controller class
- A root endpoint for browser testing
- A
/helloendpoint with a query parameter - A
/pingendpoint for quick checks - Basic tests for context loading and endpoint behavior
- Gradle Wrapper for easier setup
- Java 17
- Spring Boot
- Gradle Wrapper
spring-starter-v2/
├── build.gradle
├── settings.gradle
├── gradlew
├── gradlew.bat
├── gradle/wrapper/
├── src/main/java/live/learnwithchampak/demo/
│ ├── DemoApplication.java
│ └── controller/
│ └── HelloController.java
├── src/main/resources/
│ └── application.properties
└── src/test/java/live/learnwithchampak/demo/
├── DemoApplicationTests.java
└── controller/
└── HelloControllerTest.java
gradlew.bat bootRun./gradlew bootRunThe application starts on:
http://localhost:8080
Open these in your browser:
http://localhost:8080/
http://localhost:8080/ping
http://localhost:8080/hello
http://localhost:8080/hello?name=Champak
Spring Starter v2 is running.
pong
Hello World!
Hello Champak!
gradlew.bat test./gradlew test- Use the Gradle Wrapper instead of a system Gradle install when possible.
- The first run may download dependencies from Maven Central.
- Java 17 should be installed and available on your system.
- Add a service layer
- Return JSON instead of plain text
- Add POST endpoints
- Connect a database later
This project includes the existing license file from the original demo.