Spring Boot just went GA and it feels like a breath of fresh air. If you have ever spent a morning wiring servlets, a lunch break fighting XML, and an afternoon chasing one missing component scan, you know the feeling. Today we can spin apps that start fast, ship as a single jar, and still keep the familiar Spring model. That is the charm of Spring Boot quick starts. Convention without regret. Start right away, keep control when it matters.
What a Spring Boot quick start really is
Spring Boot gives you Starter POMs, auto configuration, and an embedded server. Add a starter, write a tiny main class, and run. No container to install. No web.xml. Your app is the server.
<!-- pom.xml -->
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>com.example</groupId>
<artifactId>demo</artifactId>
<version>0.0.1</version>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.0.0.RELEASE</version>
</parent>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>// DemoApplication.java
package com.example.demo;
import org.springframework.boot.SpringApplication;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
@Configuration
@ComponentScan
@EnableAutoConfiguration
public class DemoApplication {
public static void main(String[] args) {
SpringApplication.run(DemoApplication.class, args);
}
}// HelloController.java
package com.example.demo;
import org.springframework.web.bind.annotation.*;
@RestController
public class HelloController {
@RequestMapping("/hello")
public String hello() {
return "hello boot";
}
}Run mvn spring-boot:run. Hit http://localhost:8080/hello. That is a quick start. The defaults come from auto configuration that inspects your classpath and sets sane beans. You can keep going with Tomcat out of the box or swap to Jetty if that fits your stack.
Production bits without the yak shave
Boot brings Actuator. It adds endpoints for health, info, metrics, and env. You can wire them into your monitoring right away. No extra wiring, no custom servlets, no secret flags.
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-actuator</artifactId>
</dependency>With that on the classpath you get endpoints like /health and /metrics. Put basic info in your application.properties and ship.
# src/main/resources/application.properties
info.app.name=demo
info.app.version=0.0.1
management.port=8081
management.address=127.0.0.1Start the jar and curl the endpoints. Your app now tells you how it feels. That short loop is gold when you are pushing small services or building internal tools that need care from day one.
Configuration that stays boring
There is a myth that Boot hides everything. It does hide noise. It does not hide control. You can override any bean. You can use application.properties and profiles to keep secrets out of your default config and to tune for each target.
# switch ports per profile
server.port=8080
---
spring.profiles=prod
server.port=80// Customizing an auto configured bean
@Bean
public ObjectMapper objectMapper() {
return new ObjectMapper()
.enable(SerializationFeature.INDENT_OUTPUT);
}Boot starts you with smart defaults and invites you to override with plain code or simple properties. That is the heart of convention without regret. Move fast, then tune without a rewrite.
Where Boot shines and where others fit
Classic Spring with XML gives fine grained control but slows the first mile. Java config closed that gap but you still write a lot before the first endpoint. Boot turns the first mile into a sprint and keeps the same Spring core so your skills carry over.
Dropwizard is a sharp kit for small HTTP services with clear choices. If you love its bundle style and Jersey first approach, it is a great fit. Boot leans on the full Spring stack, gives a big starter catalog, and keeps a friendly path to data access, messaging, and templating without extra glue.
Rails fans will smile at the speed of new apps. The difference is that Boot keeps the knobs in reach. Less magic, more plain Java when you need it.
Practical checklist to ship your first Boot app
- Create a project with the web starter and Actuator. Keep the parent in your POM for managed versions.
- Write the main class with @EnableAutoConfiguration and a tiny controller. Verify with curl.
- Add application.properties with a custom port, logging level, and info fields.
- Set up profiles for dev and prod. Different ports or data sources per profile.
- Write a slice test with
@WebAppConfigurationand MockMvc to lock the contract. - Package a fat jar with spring-boot-maven-plugin. Run with
java -jar. - Expose health on a separate port and wire it to your monitor of choice.
// Simple test with MockMvc
@RunWith(SpringJUnit4ClassRunner.class)
@SpringApplicationConfiguration(classes = DemoApplication.class)
@WebAppConfiguration
public class HelloControllerTest {
@Autowired private WebApplicationContext wac;
private MockMvc mvc;
@Before
public void setup() {
mvc = MockMvcBuilders.webAppContextSetup(wac).build();
}
@Test
public void hello() throws Exception {
mvc.perform(get("/hello"))
.andExpect(status().isOk())
.andExpect(content().string("hello boot"));
}
}Ship fast without losing yourself in config. That is the Boot promise I can get behind.