Component vs @Service in Spring | An Actual Answer

spring service vs component | MVP Java
Reading Time: 6 minutes

Are you confused on what’s the difference between @Component and @Service in Spring? Your not alone! The confusion over when to use @Service vs. @Component is felt by all who learn Spring. In this post, you’ll learn when and why you should favor the @Service over @Component annotation through some actual use cases.

Continue reading “Component vs @Service in Spring | An Actual Answer”

Spring Nested Transactions

Nested Transaction in Spring
Reading Time: 10 minutes

Spring nested transactions are a bit like the black sheep of the transaction family – easily misunderstood and cast aside in documentation. Nested transactions are however incredibly useful for use cases consisting of large bulk updates and/or operating over unreliable connections. Let’s take a look at how we can bring this black sheep back …  Continue reading “Spring Nested Transactions”

Spring Boot and JUnit 5

Spring Boot and JUnit 5
Reading Time: 3 minutes

The much anticipated release of JUnit 5 is almost here and Spring 5.0 will have official support for it. However,  it’s still possible to run JUnit 5 Tests within your current Spring applications right now. I’ll show you how to bring you testing to the next level by using Spring Boot and JUnit 5. This Post concentrates on the new ability to Dependency Inject right into our @Test method parameters. I warn you though, after getting a taste of this … there’s no going back!

Continue reading “Spring Boot and JUnit 5”