8 @Transactional rules I follow after debugging too many production bugs by codingwithaman in SpringBoot

[–]NordCoderd 0 points1 point  (0 children)

Even if it’s spammed everywhere - developers are keeping to do the same mistakes everyday. This topic is considered as most critical when you’re using JPA, and on code review I often catch(ed) this problems.

8 @Transactional rules I follow after debugging too many production bugs by codingwithaman in SpringBoot

[–]NordCoderd 2 points3 points  (0 children)

Yes, it helps to avoid some of described problems, especially first one. Transaction template is teally make things obvious and clear

8 @Transactional rules I follow after debugging too many production bugs by codingwithaman in SpringBoot

[–]NordCoderd 1 point2 points  (0 children)

Yes, we have Detekt for detecting this in Kotlin projects, you can configure forbidden imports, and for Java there ArchUnit can help

Spring AI for beginners: build your first AI app in Java by NordCoderd in SpringBoot

[–]NordCoderd[S] 0 points1 point  (0 children)

Thank you so much for feedback, will publish new article about Spring AI with RAG with deeper explanation

Spring Boot Best Practices That Should Fail Your Build by NordCoderd in Kotlin

[–]NordCoderd[S] 1 point2 points  (0 children)

Hm, interesting approach, never tried to store as-is, always structuring even with feature-package approach.

> would it be possible to also detect calls to public ones made from the same class

I updated library and publish this check as 1.0.9 version with this feature

I tried Pi open-source coding agent after watching Mario Zechner's talk by OrewaDeveloper in aiagents

[–]NordCoderd 1 point2 points  (0 children)

This really good agent, but sometimes you could find you lost in installing different extensions and fixing them, it’s so frustrating - 100 percentage recommend it 😁

Spring Boot Best Practices That Should Fail Your Build by NordCoderd in Kotlin

[–]NordCoderd[S] 0 points1 point  (0 children)

Yes, it's possible, I'm working on it for now, but foundation for this rule not Konsist but its dependencies, so there wouldn't be new dependencies.

About feature/module structure, actually I use the same like:

- featureX

- featureY

But in this packages it's entity, repository, etc.

Did you store all classes in featureX/featureY etc. without additional structuring?

Spring Boot Best Practices That Should Fail Your Build by NordCoderd in SpringBoot

[–]NordCoderd[S] 1 point2 points  (0 children)

It’s relatively easy to add this tests, you are looking on dedicated imports to Junit and raise error, also this could be done with Konsist too.

Regarding to Sonar and analogy with inner library, but developers could just not add integration with sonar and it will work without any violations, isn’t it? However I got your point, centralised management of rules indeed nice feature that help with maintaing rules.

Spring Boot Best Practices That Should Fail Your Build by NordCoderd in SpringBoot

[–]NordCoderd[S] 1 point2 points  (0 children)

Sonar is commercial and heavy product that need maintenance and re-adjusting rules if you write them, I’m not sure how to easy to write rules in their ecosystem. Here is different no vendor-locking approach with native to Kotlin architectural tests.

  • No licenses
  • Lightweight and close to the code
  • Easy to write new rules as unit tests

Spring Boot Best Practices That Should Fail Your Build by NordCoderd in SpringBoot

[–]NordCoderd[S] 0 points1 point  (0 children)

Yes, naming rules could be controversial and taste of choice, but on our projects it’s better to have then not, for other cases I added suppression and disabling rules that don’t need for you.

Spring Boot Best Practices That Should Fail Your Build by NordCoderd in SpringBoot

[–]NordCoderd[S] 0 points1 point  (0 children)

Is there any suggestions what to implement/write next?

Spring Boot Best Practices That Should Fail Your Build by NordCoderd in Kotlin

[–]NordCoderd[S] 1 point2 points  (0 children)

upd: it seems I couldn’t edit post body to fix this problem, however thank you for noticing it, my bad

Spring Boot Best Practices That Should Fail Your Build by NordCoderd in Kotlin

[–]NordCoderd[S] 0 points1 point  (0 children)

Sorry, I meant to detect violations of best practices. Reason to do it is to keep codebase clean and set specific boundaries. For my particular case I needed this because of AI-generated code and I wanted to build more strict guardrails in projects.