Class SplibDataStoreDependentControllerAdvice
java.lang.Object
jp.ecuacion.splib.web.advice.SplibDataStoreDependentControllerAdvice
Provides the function that puts logged-in accounts info to
Model.
Additionally, login-related procedure is done here.
You can use the function by creating a class extends this. If the app you're creating doesn't have login feature, you don't need this.
If you store the account info to a database and use JPA to access the database,
Use jp.ecuacion.splib.web.jpa.advice.SplibJpaAccountControllerAdvice
in ecuacion-splib-web-jpa.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected voidAdditional procedure for accounts belonging to group can be define by overriding the method.protected voidAdditional procedure for both general accounts and admin accounts can be define by overriding the method.protected voidsetAccountInfo(org.springframework.ui.Model model, org.springframework.security.core.userdetails.UserDetails loginUser) Sets account info into aModel.
-
Constructor Details
-
SplibDataStoreDependentControllerAdvice
public SplibDataStoreDependentControllerAdvice()
-
-
Method Details
-
setAccountInfo
@ModelAttribute protected void setAccountInfo(org.springframework.ui.Model model, @AuthenticationPrincipal org.springframework.security.core.userdetails.UserDetails loginUser) Sets account info into aModel.- Parameters:
model- modelloginUser- UserDetails
-
executeForAll
protected void executeForAll()Additional procedure for both general accounts and admin accounts can be define by overriding the method. -
executeForAccountBelongingToGroup
Additional procedure for accounts belonging to group can be define by overriding the method.
-