You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: documentation/spring-boot-docs/src/docs/antora/modules/reference/pages/features/developing-auto-configuration.adoc
+5-3Lines changed: 5 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -238,17 +238,19 @@ Finally, a single "starter" dependency is provided to help users get started as
238
238
239
239
Concretely, a custom starter can contain the following:
240
240
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.
243
243
In a nutshell, adding the starter should provide everything needed to start using that library.
244
244
245
245
This separation in two modules is in no way necessary.
246
246
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.
247
247
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.
249
249
250
250
If the auto-configuration is relatively straightforward and does not have optional features, merging the two modules in the starter is definitely an option.
251
251
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.
0 commit comments