This is a simple Spring Boot application that allows users to register and log in. Registered user details are stored in a MySQL database. An admin can log in to view registered user details via email.
These instructions will help you set up and run the project on your local machine.
To run this project, you need to have the following software installed on your machine:
- Java Development Kit (JDK)
- MySQL Database
- Integrated Development Environment (IDE) (e.g., IntelliJ IDEA, Eclipse, Vscode)
- Apache Maven
- Google app password
- Default username and password for admin => username ->
admin, password ->admin123you can modify onregister/src/main/java/com/example/register/admin/AdminController.java - Default generating .war file name is
training.waryou can modify at line 94 onregister/pom.xml<finalName> enter-custom-war-file-name</finalName>
-
Clone the repository to your local machine:
git clone https://github.com/abinesh-code/Rejistration-java.git
-
Configure your database credentials on
register/src/main/resource/application.yml -
Create a Google-app password by https://myaccount.google.com -> Security -> Two factor authentication (turn on) -> (scroll down) App passwords. Generate new app password and copy
-
Configure google account -> Go to line 15 on
register/src/main/java/com/example/register/mail/EmailService.javaenter you google account gmail and generated app password -
Configure you email reciver -> Go to line 53 on
register/src/main/java/com/example/register/user/UserController.javaenter reciver email -
Go to
regiter/and run the commandmvn clean installon terminal -
Go to
register/target/you can see generated war file -
You can either deploy that .war file on external tomacat server on run with the following command
java -jar training.warthe server will start onlocalhost:8080 -
Open browser and type
localhost:8080/registerfor registeration page andlocalhost:8080/adminfor admin page