I am writing a small project in Spring, there is a main login page, where, if the user is entered correctly, it is redirected to the welcome page.
My question is -how can I get the data entered by the user in order to operate on them further by implementing certain logic? The fact is that in addition to the username and password, there are several more fields and it is the data from them that I want to receive for verification
There is no database in the project, the correct username and password are in application.properties
-
Answer # 1
-
Answer # 2
The easiest way for a test project to make some kind of class to store such data class Storage { public static Map < String, Object > data= new HashMap < > (); }
Well, store your data there. At the time of the request, just put something there and take it out at the right time Strorage.data.put ("Field1", "Here some data"); Storage.data.get ("field1");
- java : Getting the id of an authorized Spring Security user
- java : Overriding the Spring security login page
- java : Spring Boot Security, how to set up Russian login?
- java : FindByUsername JpaRepository doesn't work
- java : Transition not firing after Spring Security authorization
- java : Encoded password does not look like BCrypt (Spring Security)
- Java Why does Spring -Tomcat close all connections it has created?
- java : Getting value from JSP form to method
- java : Incorrect time (time zone) in the response
The easiest way for a test project to make some kind of class to store such data class Storage { public static Map < String, Object > data= new HashMap < > (); }
Well, store your data there. At the time of the request, just put something there and take it out at the right time Strorage.data.put ("Field1", "Here some data"); Storage.data.get ("field1");