Skip to content

Auto-configuration samples in spring-boot-docs should be final as well #46780

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Conversation

izeye
Copy link
Contributor

@izeye izeye commented Aug 11, 2025

The checkArchitectureMain task from the spring-boot-docs fails as follows:

% ./gradlew clean :documentation:spring-boot-docs:checkArchitectureMain
...
> Task :documentation:spring-boot-docs:checkArchitectureMain FAILED
...

And failure-report.txt contains the following:

Architecture Violation [Priority: MEDIUM] - Rule 'classes that are annotated with @AutoConfiguration should be public and should have modifier FINAL' was violated (3 times):
Class <org.springframework.boot.docs.features.developingautoconfiguration.conditionannotations.beanconditions.MyAutoConfiguration> does not have modifier FINAL in (MyAutoConfiguration.java:0)
Class <org.springframework.boot.docs.features.developingautoconfiguration.conditionannotations.classconditions.MyAutoConfiguration> does not have modifier FINAL in (MyAutoConfiguration.java:0)
Class <org.springframework.boot.docs.features.developingautoconfiguration.testing.MyServiceAutoConfiguration> does not have modifier FINAL in (MyServiceAutoConfiguration.java:0)
Architecture Violation [Priority: MEDIUM] - Rule 'members that are declared in classes that are annotated with @AutoConfiguration and aren't default constructors and aren't constants and don't override public methods should not be public' was violated (2 times):
Method <org.springframework.boot.docs.features.developingautoconfiguration.conditionannotations.beanconditions.MyAutoConfiguration.someService()> has modifier PUBLIC in (MyAutoConfiguration.java:29)
Method <org.springframework.boot.docs.features.developingautoconfiguration.testing.MyServiceAutoConfiguration.userService(org.springframework.boot.docs.features.developingautoconfiguration.testing.MyServiceAutoConfiguration$UserProperties)> has modifier PUBLIC in (MyServiceAutoConfiguration.java:35)

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Aug 11, 2025
@snicoll snicoll self-assigned this Aug 12, 2025
@snicoll snicoll changed the title Fix checkArchitectureMain failures from spring-boot-docs Auto-configuration samples in spring-boot-docs should be final as well Aug 12, 2025
@snicoll snicoll added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Aug 12, 2025
@snicoll snicoll added this to the 4.0.0-M2 milestone Aug 12, 2025
@snicoll
Copy link
Member

snicoll commented Aug 12, 2025

See also #32883

@izeye I don't understand this. Perhaps a cache issue but I cleaned and even ran --rerun-taks but I couldn't manage to reproduce the error above. That said, the change looks good so I am going to merge it.

snicoll pushed a commit that referenced this pull request Aug 12, 2025
@snicoll snicoll closed this in 7241645 Aug 12, 2025
@izeye izeye deleted the spring-boot-docs-checkArchitectureMain-failures branch August 12, 2025 09:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants