Skip to content

zekiefa/testecvc-atualizado

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

41 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Simple Spring Boot Project

Architecture

Instructions

  • Clone the project
  • Run the project: $ mvn spring-boot:run

About the application

It's a RESTFull API for booking and searching a hotel with JWT authentication.

JWT Authentication

curl --request POST \
--url http://localhost:8080/auth \
--header 'Content-Type: application/json' \
--data '{
"user": "usuario",
"passwd": "senha"
}'

Access the application with the token

curl --request GET \
  --url http://localhost:8080/booking/55/2022-08-27/2022-08-27/2/1 \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c3VhcmlvIiwiaXNzIjoidGVzdGVjdmMiLCJpYXQiOjE2NjE2NTM4MzMsImV4cCI6MTY2MTc0MDIzM30.daC15QAqKtpJRhSz-Y63Ul_bHOVZHCpJeZbZnx7JMjI'
curl --request GET \
  --url http://localhost:8080/hotel/6 \
  --header 'Authorization: Bearer eyJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJ1c3VhcmlvIiwiaXNzIjoidGVzdGVjdmMiLCJpYXQiOjE2NjE2NTM4MzMsImV4cCI6MTY2MTc0MDIzM30.daC15QAqKtpJRhSz-Y63Ul_bHOVZHCpJeZbZnx7JMjI'

References

About

Simple API Rest in Java 11 with Spring Boot

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published