Core starter providing fundamental building blocks for Spring Boot applications with auto-configuration support, logging, and YAML parsing
npx @tessl/cli install tessl/maven-org-springframework-boot--spring-boot-starter@3.5.00
# Spring Boot Starter
1
2
The Spring Boot Starter is the foundational dependency for all Spring Boot applications, providing essential building blocks including auto-configuration support, logging infrastructure, and YAML configuration parsing. It acts as a comprehensive dependency aggregator that automatically brings together the core Spring Boot components needed to bootstrap production-grade applications.
3
4
## Package Information
5
6
- **Package Name**: org.springframework.boot:spring-boot-starter
7
- **Package Type**: maven
8
- **Language**: Java
9
- **Version**: 3.5.3
10
- **Installation**: `<dependency><groupId>org.springframework.boot</groupId><artifactId>spring-boot-starter</artifactId><version>3.5.3</version></dependency>`
11
12
## Core Imports
13
14
```java
15
import org.springframework.boot.SpringApplication;
16
import org.springframework.boot.autoconfigure.SpringBootApplication;
17
import org.springframework.boot.context.properties.ConfigurationProperties;
18
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
19
import org.springframework.boot.CommandLineRunner;
20
import org.springframework.boot.ApplicationRunner;
21
```
22
23
## Basic Usage
24
25
```java
26
@SpringBootApplication
27
public class Application {
28
public static void main(String[] args) {
29
SpringApplication.run(Application.class, args);
30
}
31
}
32
```
33
34
For command line runners:
35
36
```java
37
@Component
38
public class StartupRunner implements CommandLineRunner {
39
@Override
40
public void run(String... args) throws Exception {
41
System.out.println("Application started with command line args: " + Arrays.toString(args));
42
}
43
}
44
```
45
46
## Architecture
47
48
Spring Boot Starter is built around several key architectural components:
49
50
- **Application Bootstrap**: `SpringApplication` class provides the main entry point with lifecycle management
51
- **Auto-Configuration System**: Automatic configuration based on classpath detection and conditional logic
52
- **Configuration Properties**: Type-safe binding of external configuration to Java objects
53
- **Web Framework Integration**: Embedded server support for both servlet and reactive applications
54
- **Dependency Aggregation**: Curated set of compatible dependencies with sensible defaults
55
56
## Capabilities
57
58
### Application Bootstrap & Lifecycle
59
60
Core application startup, lifecycle management, and command line argument processing. Essential for every Spring Boot application.
61
62
```java { .api }
63
public class SpringApplication {
64
public static ConfigurableApplicationContext run(Class<?> primarySource, String... args);
65
public static ConfigurableApplicationContext run(Class<?>[] primarySources, String... args);
66
public SpringApplication(Class<?>... primarySources);
67
public ConfigurableApplicationContext run(String... args);
68
}
69
70
@interface SpringBootApplication {
71
Class<?>[] exclude() default {};
72
String[] excludeName() default {};
73
String[] scanBasePackages() default {};
74
Class<?>[] scanBasePackageClasses() default {};
75
}
76
```
77
78
[Application Bootstrap](./application-bootstrap.md)
79
80
### Auto-Configuration System
81
82
Intelligent automatic configuration based on classpath detection, providing convention-over-configuration setup for Spring Boot applications.
83
84
```java { .api }
85
@interface EnableAutoConfiguration {
86
Class<?>[] exclude() default {};
87
String[] excludeName() default {};
88
}
89
90
@interface AutoConfiguration {
91
String[] after() default {};
92
String[] before() default {};
93
Class<?>[] afterName() default {};
94
Class<?>[] beforeName() default {};
95
}
96
97
@interface ConditionalOnClass {
98
Class<?>[] value() default {};
99
String[] name() default {};
100
}
101
102
@interface ConditionalOnMissingBean {
103
Class<?>[] value() default {};
104
String[] type() default {};
105
Class<? extends Annotation>[] annotation() default {};
106
}
107
```
108
109
[Auto-Configuration](./auto-configuration.md)
110
111
### Configuration Properties
112
113
Type-safe configuration property binding with validation support, enabling external configuration management.
114
115
```java { .api }
116
@interface ConfigurationProperties {
117
String value() default "";
118
String prefix() default "";
119
boolean ignoreInvalidFields() default false;
120
boolean ignoreUnknownFields() default true;
121
}
122
123
@interface EnableConfigurationProperties {
124
Class<?>[] value() default {};
125
}
126
127
public class PropertyMapper {
128
public static PropertyMapper get();
129
public <T> PropertyMapper.Source<T> from(T value);
130
public <T> PropertyMapper.Source<T> from(Supplier<T> supplier);
131
}
132
```
133
134
[Configuration Properties](./configuration-properties.md)
135
136
### Web Framework Support
137
138
Comprehensive web application support including embedded servers (Tomcat, Jetty, Undertow, Netty) for both servlet and reactive applications.
139
140
```java { .api }
141
public enum WebApplicationType {
142
NONE, SERVLET, REACTIVE
143
}
144
145
public interface WebServer {
146
void start() throws WebServerException;
147
void stop() throws WebServerException;
148
int getPort();
149
void shutDownGracefully(GracefulShutdownCallback callback);
150
}
151
152
public interface ServletWebServerFactory extends WebServerFactory {
153
WebServer getWebServer(ServletContextInitializer... initializers);
154
}
155
156
public interface ReactiveWebServerFactory extends WebServerFactory {
157
WebServer getWebServer(HttpHandler httpHandler);
158
}
159
```
160
161
[Web Framework](./web-framework.md)
162
163
### Data Access & Persistence
164
165
Database connectivity, transaction management, and ORM integration with support for JDBC, JPA, R2DBC, and database migration tools.
166
167
```java { .api }
168
public final class DataSourceBuilder {
169
public static DataSourceBuilder create();
170
public static DataSourceBuilder create(ClassLoader classLoader);
171
public DataSourceBuilder type(Class<? extends DataSource> type);
172
public DataSourceBuilder url(String url);
173
public DataSourceBuilder username(String username);
174
public DataSourceBuilder password(String password);
175
public <T extends DataSource> T build();
176
}
177
178
@interface EntityScan {
179
String[] value() default {};
180
String[] basePackages() default {};
181
Class<?>[] basePackageClasses() default {};
182
}
183
```
184
185
[Data Access](./data-access.md)
186
187
### Logging & Diagnostics
188
189
Comprehensive logging infrastructure with structured logging support and application failure analysis capabilities.
190
191
```java { .api }
192
public abstract class LoggingSystem {
193
public static LoggingSystem get(ClassLoader classLoader);
194
public abstract void beforeInitialize();
195
public abstract void initialize(LoggingInitializationContext initializationContext, String configLocation, LogFile logFile);
196
public abstract void cleanUp();
197
}
198
199
public enum LogLevel {
200
TRACE, DEBUG, INFO, WARN, ERROR, FATAL, OFF
201
}
202
203
public interface FailureAnalyzer {
204
FailureAnalysis analyze(Throwable failure);
205
}
206
```
207
208
[Logging & Diagnostics](./logging-diagnostics.md)
209
210
### Task Execution & Scheduling
211
212
Asynchronous task execution and scheduling infrastructure with customizable thread pool management.
213
214
```java { .api }
215
public class ThreadPoolTaskExecutorBuilder {
216
public ThreadPoolTaskExecutorBuilder corePoolSize(int corePoolSize);
217
public ThreadPoolTaskExecutorBuilder maxPoolSize(int maxPoolSize);
218
public ThreadPoolTaskExecutorBuilder queueCapacity(int queueCapacity);
219
public ThreadPoolTaskExecutorBuilder keepAlive(Duration keepAlive);
220
public ThreadPoolTaskExecutorBuilder threadNamePrefix(String threadNamePrefix);
221
public ThreadPoolTaskExecutor build();
222
}
223
224
public interface TaskExecutor extends Executor {
225
void execute(Runnable task);
226
}
227
```
228
229
[Task Execution](./task-execution.md)
230
231
## Common Types
232
233
```java { .api }
234
public interface ApplicationArguments {
235
String[] getSourceArgs();
236
Set<String> getOptionNames();
237
boolean containsOption(String name);
238
List<String> getOptionValues(String name);
239
List<String> getNonOptionArgs();
240
}
241
242
public interface CommandLineRunner {
243
void run(String... args) throws Exception;
244
}
245
246
public interface ApplicationRunner {
247
void run(ApplicationArguments args) throws Exception;
248
}
249
250
public interface BootstrapContext {
251
<T> T get(Class<T> type) throws IllegalStateException;
252
<T> T getOrElse(Class<T> type, T other);
253
<T> boolean isRegistered(Class<T> type);
254
}
255
256
public interface ConfigurableBootstrapContext extends BootstrapContext {
257
<T> void register(Class<T> type, InstanceSupplier<T> instanceSupplier);
258
<T> void registerIfAbsent(Class<T> type, InstanceSupplier<T> instanceSupplier);
259
void addCloseListener(ApplicationListener<BootstrapContextClosedEvent> listener);
260
void close();
261
}
262
263
@FunctionalInterface
264
public interface InstanceSupplier<T> {
265
T get(BootstrapContext context);
266
}
267
```