初始版本
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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 dealsky
|
||||
* @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";
|
||||
}
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user