29 lines
757 B
Java
29 lines
757 B
Java
package com.vverp.controller;
|
|
|
|
import com.vverp.service.InformationService;
|
|
import org.springframework.stereotype.Controller;
|
|
import org.springframework.ui.ModelMap;
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
/**
|
|
* @author
|
|
* @date 2021/4/27 下午5:33
|
|
*/
|
|
@Controller
|
|
@RequestMapping("/information")
|
|
public class InformationController {
|
|
|
|
@Resource
|
|
private InformationService informationService;
|
|
|
|
@RequestMapping("/{title}")
|
|
public String preview(ModelMap modelMap, @PathVariable String title) {
|
|
modelMap.addAttribute("information", informationService.findSingle());
|
|
return "/information/preview";
|
|
}
|
|
|
|
}
|