Skip to content

SpringSrikanth/SpringRestCrud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Spring REST CRUD API with Spring Boot, Mysql, JPA ,Spring Security, JWT, Mongodb, Hibernate

Steps to Setup

1. Clone the application

https://github.com/SpringSrikanth/OnlineProject.git
branch master

2. Create Mysql database

create database mydb

3. Change mysql username and password as per your installation

  • open src/main/resources/application.properties

  • change spring.datasource.username and spring.datasource.password as per your mysql installation

to see pom.xml

4. Build and run the app using maven

To build and download dependencies--> mvn clean install -DskipTests

To build .jar file --> mvn clean package -DskipTests

To run application --> java -jar target/spring-boot-rest-api-tutorial-0.0.1-SNAPSHOT.jar -DskipTests

Another method to run application --> mvn spring-boot:run -DskipTests

Alternatively, you can run the app without packaging it using -

mvn spring-boot:run -DskipTests

The app will start running at http://localhost:9090.

Explore Rest APIs

UserDetails Controller view

Root path "users"

eg:"users/create/user"

 POST Create User= "/create/user"

 POST Update User="/user/update"

 GET Users Working or not = "/health"

 POST Delete User="/user/delete/{id}" eg: "users/user/delete/1"

 GET User Details By Id="/user/{id}"

MainController (Auth Controller) view

Root path ""

POST "/authenticate"

GET "/welcome"

UsersRoles Controller view

Root path ""

 POST "/role/create"
 
 POST "/addRole/ToUsers/{roleId}"
 
 POST "/userRole/removeUser" 
 
 POST "/addRole/removeAllUsers" 
 
 POST "/deleteRole"

JpaModal Controller view

Root path ""

 GET "/user/users"
 
 GET "/user/roles

Common Controller view

Root path ""

 POST "/encode/encodeString/{text}"
 
 POST "/decode/decodeString/{text}"

Used Dependencies

mysql-connector-java(5.1.28)

h2database

jjwt(9)

jaxb-api

commons-codec

spring-boot-starter-data-mongodb

spring-boot-devtools

Spring Secutiry

Log4j

updated to MySQL 8.0

to download pls follow https://dev.mysql.com/downloads/file/?id=499590
https://dev.mysql.com/get/Downloads/MySQLInstaller/mysql-installer-community-8.0.22.0.msi

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages