Spring MVC project with using Spring Boot and JPA where AlienController is @RestController and responsible for following REST APIs
-
Get all aliens
- curl --location 'localhost:8080/SpringMVCWithBoot/aliens'
-
Get alien by id
- curl --location 'localhost:8080/SpringMVCWithBoot/alien/102'
-
Add alien
- curl --location 'localhost:8080/SpringMVCWithBoot/alien' \ --header 'Content-Type: application/x-www-form-urlencoded' \ --data-urlencode 'aid=115' \ --data-urlencode 'aname=ABC'