Question 1
A vendor called Acme wants to publish a reusable Spring Boot integration for its messaging client so that adding one dependency gives applications working defaults that still back off when the application declares its own beans. The team is deciding how to structure and name the artifacts they publish to Maven Central. Which statement correctly describes the roles of an `autoconfigure` module and a `starter` module, and the naming rule for a third-party starter?
A. The starter module must contain the auto-configuration classes and the auto-configuration candidates file, while the `autoconfigure` module exists only to declare the optional third-party dependencies those classes are conditional on.
Inverts the roles of the two modules. The auto-configuration classes, their conditions, and the candidates file belong in the `autoconfigure` module; the starter is the dependency-aggregating artifact, not the code-bearing one.
B. The `autoconfigure` module holds the auto-configuration classes, their conditions, and the auto-configuration candidates file; the starter is essentially an empty artifact that depends on the `autoconfigure` module plus the libraries needed to make the feature useful. A third-party starter should be named `acme-spring-boot-starter`, because the `spring-boot-starter-` prefix is reserved for official Spring Boot starters — and the two concerns may be combined into a single module if the team does not need to separate them.Correct answer
Correct on all three points, per the 'Creating Your Own Starter' guidance: the `autoconfigure` module carries the conditional configuration code, the starter carries only dependencies so that one coordinate pulls in a working setup, third-party starters use the `<name>-spring-boot-starter` pattern because the reversed prefix is reserved for the Spring Boot team, and the split is a convention that may be collapsed into one module.
C. The artifact must be named `spring-boot-starter-acme`, because `@EnableAutoConfiguration` discovers auto-configurations by scanning the classpath for jars whose names begin with `spring-boot-starter-`.
Names the misconception that auto-configuration discovery is driven by artifact naming. Discovery is driven entirely by the auto-configuration candidates file inside the jar; furthermore the `spring-boot-starter-` prefix is reserved for starters maintained by the Spring Boot team, so a third party must not use it.
D. Publishing two modules is mandatory: an auto-configuration cannot back off correctly with `@ConditionalOnMissingBean` unless the conditional code and the dependency declarations are packaged in separate artifacts.
Names the misconception that the two-module split is a functional requirement of the condition mechanism. Bean conditions are evaluated at runtime against the classpath and bean registry and are indifferent to module layout; the reference documentation explicitly allows combining the two concerns into a single module when separation is not needed.
Explanation
A starter is a dependency descriptor: it contains essentially no code and simply pulls in the auto-configuration module together with whatever libraries the technology needs, so an application gets a working, opinionated setup from a single coordinate. The auto-configuration module is where the conditional configuration lives — the auto-configuration classes, their `@ConditionalOn...` annotations, and the file that lists them as candidates. Naming follows `<name>-spring-boot-starter` for third parties because the reversed `spring-boot-starter-<name>` prefix is reserved for starters maintained by the Spring Boot team, and the two modules may be merged into one when the separation of concerns is not needed. Explanations that swap the two modules' contents, that tie discovery or back-off behaviour to artifact naming or module layout, all misplace mechanisms that are actually governed by the candidates file and by runtime condition evaluation.