Last active
          July 3, 2021 12:38 
        
      - 
      
- 
        Save prashanth-sams/2f2ae331eb8a5ed8b587fe0f58111de0 to your computer and use it in GitHub Desktop. 
    Controller
  
        
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
  | package com.wmock.info.controllers; | |
| import com.wmock.info.models.ChapterInfoModel; | |
| import org.springframework.web.bind.annotation.*; | |
| @RestController | |
| @RequestMapping(value = "/api/chapter", produces = "application/json") | |
| public class ChapterInfoController { | |
| @RequestMapping(method = RequestMethod.GET, value = "/{chapterId}") | |
| public ChapterInfoModel getChapterInfo(@PathVariable("chapterId") String chapterId) { | |
| return new ChapterInfoModel(chapterId, "Chapter name"); | |
| } | |
| } | 
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment