Reputation: 315
Well i'm building some personal project to learn spring roo 2. Now i'm struggling with spring security. There is little information about spring roo 2 in google and many relatively useful information on spring boot relating to spring roo.
with the command "security setup" you got the "--provider" option.
This is the description that the help gives you:
optional --provider: The Spring Security provider to install. Possible values are:
DEFAULT
(default Spring Security configuration provided by Spring Boot will be used), andSPRINGLETS_JPA
(advanced Spring Security configuration will be included using Springlets JPA Authentication).; default: 'DEFAULT'
I couldn't find the difference between these two options, even on the spring roo M3 reference documentation. Even searching for "Springlets JPA Authentication" gives no information about it.
Anyone has any clue about this?
Thanks
Upvotes: 1
Views: 608
Reputation: 3882
These are the main differences between this two providers:
DEFAULT
: Is the default Spring Security auto-configuration provided by Spring Boot when you include the spring-boot-starter-security
in your project classpath. This is the default option because Spring Roo always tries to generate applications that use the auto-configuration provided by Spring Boot.
spring-boot-starter-security
dependency will be included to your pom.xml fileSPRINGLETS_JPA
: If you select this provider, the default Spring Security auto-configuration provided by Spring Boot will be used. In addition, this provider will include the Springlets library to your classpath that provides you some extra starters to auto-configure advanced Spring Security properties. Also, configures the security authentication to use and user from the database instead of the default in-memory authentication provided by Spring Boot auto-configuration. You will be able to manage these configuration using the application.properties
file and including the properties springlets.security.auth.in-memory.enabled
and springlets.security.auth.in-memory.erase-credentials
.
springlets-boot-starter-authentication
dependency will be included to your pom.xml filesecurity.enable-csrf=true
property will be included to enable CSRF
. Know more about CSRF and Spring Security hereHope it helps,
Upvotes: 5