dplucenio / minimal-rest-service-with-spring-webmvc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

🍃 minimal-rest-service-with-spring-webmvc

Minimalist Java program using only spring-context and spring-webmvc for study purposes, to better how Spring Boot configures WebApplicationContexts, DispatcherServlet, Controllers, global Exception handling, etc.

The goal is to keep this as simple as possible and cover:

  • Refactor plain java minimal RESTful service created previosly to use Spring's IoC Container.
  • Setting up WebApplicationContext
  • DispatcherServlet
  • Controllers
  • GET endpoint, @ResponseBody
  • POST endpoints, @RequestBody
  • @PathVariable e @RequestParam
  • Global exception handling
  • Database connection

Progress is going to be stored on different branches, starting from 1-refactor-to-spring-ioc-container.

This projects uses maven and Java 11.

To create the executable jar, run:

mvn clean package

This will produce a bundle jar. To run the application:

java -jar minimal-rest-service-with-spring-webmvc-1.0-SNAPSHOT.jar

About


Languages

Language:Java 100.0%