May 2018
Intermediate to advanced
310 pages
6h 18m
English
What is a controller? You remember we said that one of the major Spring Framework benefits is MVC? You remember that C stands for a controller. Well, we will define one now. Create a controller package in the root package for the application and a member class NoteController:
package com.journaler.api.controller import org.springframework.boot.autoconfigure.EnableAutoConfiguration import org.springframework.http.MediaType import org.springframework.web.bind.annotation.GetMapping import org.springframework.web.bind.annotation.RequestMapping import org.springframework.web.bind.annotation.RestController @RestController @RequestMapping("/notes") @EnableAutoConfiguration class NoteController { @GetMapping( value = "/obtain", ...Read now
Unlock full access