Skip to content

The back-end for a contact manager application, with Spring security.

Notifications You must be signed in to change notification settings

H3AR7B3A7/ContactManagerBackend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

23 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Contact Manager

This is the backend for a simple contact manager application, with JWT authentication. The front-end can be found here.

JWT

We can decode our tokens at the JWT Official Website.

REST

Representational state transfer (REST) is a style of software architecture. As described in a dissertation by Roy Fielding, REST is an "architectural style" that basically exploits the existing technology and protocols of the Web.

RESTful

Our service is RESTful when it adheres to the following principles:

  • It should be stateless
  • It should access all the resources from the server using only URI
  • It does not have inbuilt encryption
  • It does not have session
  • It uses one and only one protocol - HTTP
  • For performing CRUD operations, it should use HTTP verbs such as GET, POST, PUT, DELETE
  • It should return the result only in the form of JSON or XML, atom, OData etc. (lightweight data )

We can find an interesting post on RESTful design on stackoverflow here.

Swagger

We can now just add the springdoc-openapi-ui dependency:

<dependency>
     <groupId>org.springdoc</groupId>
     <artifactId>springdoc-openapi-ui</artifactId>
     <version>1.5.9</version>
</dependency>

And then for the UI just go to:

For the Json go to:

For yaml:

That's really all there is to it... No annotations / configuration needed.

If you are using spring security, make sure you can reach these paths for it to work:

  • /swagger-ui.html
  • /swagger-ui/**
  • /v3/api-docs/**

We can find more information here.

We can also create our own yaml. For that we can find an example here.


Work in progress ...

About

The back-end for a contact manager application, with Spring security.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages