Skip to content

zvision/spring-openApi

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 

Repository files navigation

Simpel Spring Boot project implementerar AOP and OpenApi

Spring Boot 2.2.2.RELEASE
Java 11

Hur/vad göra

  • Att bygga: mvn clean package

  • Att köra: mvn spring-boot:run (java -jar target\spring-openApi-0.0.1-SNAPSHOT.jar)

  • Debug: mvn spring-boot:run -Dspring-boot.run.jvmArguments="-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5000 -Dserver.port=8080" och sen i Eclipse meny -välj "Debug configurations..." -> och skapa en "Remote Java Application",
    sätt parametrarna Host: localhost, Port: 5000

swagger-ui.html
---------------------

see: http://localhost:8080/index.html

In-memory databasen

Driver Class: org.h2.Driver
JDBC URL: jdbc:h2:mem:testdb
User Name: sa
Password: password

http://localhost:8080/h2-console/login.do

Endpoints
--------------

GET:
curl http://localhost:8080/customer/get/1

POST:
curl -X POST -d "{"firstName":"Graham","lastName":"Bell","email":"[email protected]","email1":"[email protected]","age":38}" -H "Content-Type: application/json" http://localhost:8080/customer/add

DELETE:
curl -X DELETE http://localhost:8080/customer/delete/3

Ex på record
-----------------
{"firstName":"Graham","lastName":"Bell","email":"[email protected]","email1":"[email protected]","age":38} {"firstName":"Thomas","lastName":"Edison","email":"[email protected]","email1":"[email protected]","age":33}

About

Simple Spring boot app implements OpenApi

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published