Aplicação spring boot + angularjs + mysql e fonte do app

http://websystique.com/spring-boot/spring-boot-angularjs-spring-data-jpa-crud-app-example/

Otímo exemplo de crud jpa + spring boot

http://toxinavirtual.blogspot.com.br/2016/09/crud-com-rest-spring-boot-e-jpa.html

authentication with database

http://www.programming-free.com/2015/09/spring-security-jdbc-authentication.html

authentication with userDetailService

https://hellokoding.com/registration-and-login-example-with-spring-security-spring-boot-spring-data-jpa-hsql-jsp/  código no githut aqui

Excelente artigo sobre o que é spring boot, authentication com jpa ou userDetailService

http://blog.algaworks.com/spring-security/


Explicação sobre anotations @service, @repository, @controller  e @component

In Spring 2.0 and later, the @Repository annotation is a marker for any class that fulfills the role or stereotype (also known as Data Access Object or DAO) of a repository. Among the uses of this marker is the automatic translation of exceptions.

Spring 2.5 introduces further stereotype annotations: @Component, @Service, and @Controller. @Component is a generic stereotype for any Spring-managed component. @Repository, @Service, and @Controller are specializations of @Component for more specific use cases, for example, in the persistence, service, and presentation layers, respectively.

Therefore, you can annotate your component classes with @Component, but by annotating them with @Repository, @Service, or @Controller instead, your classes are more properly suited for processing by tools or associating with aspects. For example, these stereotype annotations make ideal targets for pointcuts.

Thus, if you are choosing between using @Component or @Service for your service layer, @Service is clearly the better choice. Similarly, as stated above, @Repository is already supported as a marker for automatic exception translation in your persistence layer.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s