Skip to content

Commit 542c218

Browse files
committed
Review "Creating Your Own Starter" section
Closes spring-projectsgh-48317
1 parent 7946f0e commit 542c218

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/developing-auto-configuration.adoc

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -238,17 +238,19 @@ Finally, a single "starter" dependency is provided to help users get started as
238238

239239
Concretely, a custom starter can contain the following:
240240

241-
* The `autoconfigure` module that contains the auto-configuration code for "acme".
242-
* The `starter` module that provides a dependency to the `autoconfigure` module as well as "acme" and any additional dependencies that are typically useful.
241+
* The `acme-spring-boot` module that contains the auto-configuration code for "acme" as well as any API to use the feature.
242+
* The `acme-spring-boot-starter` module that provides a dependency to the other starters required by "acme", `acme-spring-boot`, and potentially additional dependencies that are typically useful.
243243
In a nutshell, adding the starter should provide everything needed to start using that library.
244244

245245
This separation in two modules is in no way necessary.
246246
If "acme" has several flavors, options or optional features, then it is better to separate the auto-configuration as you can clearly express the fact some features are optional.
247247
Besides, you have the ability to craft a starter that provides an opinion about those optional dependencies.
248-
At the same time, others can rely only on the `autoconfigure` module and craft their own starter with different opinions.
248+
At the same time, others can rely only on `acme-spring-boot` and craft their own starter with different opinions.
249249

250250
If the auto-configuration is relatively straightforward and does not have optional features, merging the two modules in the starter is definitely an option.
251251

252+
If "acme" has a basic set of dependencies that are required to work, but you want to express a more opinionated view, then having a separate starter is a good option.
253+
252254

253255

254256
[[features.developing-auto-configuration.custom-starter.naming]]

0 commit comments

Comments
 (0)