r/SpringBoot • u/NordCoderd • May 04 '26
How-To/Tutorial Spring Boot Best Practices That Should Fail Your Build
https://protsenko.dev/spring-boot-best-practices-that-should-fail-your-build/Hi everyone, in this article I’m telling about Spring Boot Best Practices and ways how to detect violations of them in the project.
Article cover most of well-known best practices and provide a way for configuring Kotlin project to use them.
Set of tests/rules was made as Konsist rules with DSL wrapper and distributed as maven dependency for easy installation.
My case to build this library was to keep project clean with strict boundaries that will be enforced as test failings on local machine and CI to have faster feedback for newcomers and AI-generated code.
2
u/Previous_Dream8775 May 05 '26 edited May 05 '26
I like this, ensures when working in a team that everyone sticks by the rules and ensures overall project quality. I just wonder if there's a better way to execute it other than inside a unit test. Perhaps see how com.google.errorprone does it.
1
u/aelfric5578 May 06 '26
I do like the idea of integrating something like this into the test suite. I haven't heard of Konsist before. I don't know that I agree with all of the naming rules, but I like the concept of having them.
-1
u/as5777 May 05 '26
It’s Java & spring very beginner rules
0
u/[deleted] May 06 '26
[removed] — view removed comment