package com.YU.web;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
/**
* @author YU
* @create 2023-09-07 14:41
*/
@Controller
public class PageController {
@RequestMapping("/page/{page}")
public String toPage(@PathVariable("page") String page){
return page;
}
@RequestMapping("/page/{dir}{page}")
public String toDirPage(
@PathVariable("dir") String dir,
@PathVariable("page") String page){
return dir + "/" + page;
}
}