News for hackers. Stuff that matters.
Re:Are software engineering “best practices” just developer ... by marsdepinski on Thursday September 30, 2021 @07:04PM (#28712365)
In your example, read the spring manual. You need the inference to help spring generate proxies for your service class. You could use cglib to remove this requirement but it's the way the spring API has been for ages. Also using an interface let's you easily mock things out and write dummy test implementations. Pretty valuable.
Re:Are software engineering “best practices” just developer ... by mobjack on Thursday September 30, 2021 @08:49PM (#28713148)
I read about spring's best practices and think some are unnecessary boilerplate code without any real benefits.

I get the theory, but in practice, the benefits are just theoretical. You could reimplement interfaces for your tests, but it is easier just to use a mocking library.