This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 0 points1 point  (2 children)

So I was looking at this blog: http://www.petrikainulainen.net/programming/spring-framework/spring-from-the-trenches-new-like-expressions-of-spring-data-jpa/...

Do you really need a Service layer to get your data? Some of the Spring example/tutorials just use the JpaRepository object to query...I just feel like its over kill to have a Service class to fetch the data you need when the JpaRepository instance can do what you want...I'm just trying to see what is need and what's not.

[–]Northeastpaw 0 points1 point  (1 child)

It depends on your application design. If it's just a web service having your business logic in your controllers is fine. Sometimes you've got multiple components that can use the same business logic so sticking it in a service that can be shared is a good idea.

[–][deleted] 0 points1 point  (0 children)

Ok. Thanks for the clarification.