| 123456789101112131415161718192021222324252627282930 |
- package com.goafanti.fragment.controller;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.web.bind.annotation.PathVariable;
- import org.springframework.web.bind.annotation.RequestMapping;
- import org.springframework.web.bind.annotation.RequestMethod;
- import org.springframework.web.bind.annotation.RestController;
- import com.goafanti.common.controller.BaseApiController;
- import com.goafanti.fragment.service.FragmentService;
- @RestController
- @RequestMapping(value = "/open/html/")
- public class FragmentController extends BaseApiController {
- @Autowired
- FragmentService fragmentService;
- @RequestMapping(value = "/get/{id}", method = RequestMethod.GET)
- public String get(@PathVariable String id) {
- return fragmentService.selectById(id);
- }
- @RequestMapping(value = "/json/{id}", method = RequestMethod.GET, produces = "application/json;charset=UTF-8")
- public String json(@PathVariable String id) {
- return fragmentService.selectById(id);
- }
- }
|