fix: 页面请求异常处理

This commit is contained in:
xiongxiaoyang 2023-05-17 23:43:27 +08:00
parent d9ad02e3f5
commit 9fe51eab74
3 changed files with 7 additions and 6 deletions

View File

@ -10,7 +10,7 @@ import org.springframework.web.bind.annotation.ExceptionHandler;
* @author 11797
*/
@Slf4j
@ControllerAdvice(basePackages = "com.java2nb.novel.page")
@ControllerAdvice(basePackages = "com.java2nb.novel.controller.page")
public class PageExceptionHandler {

View File

@ -1,4 +1,4 @@
package com.java2nb.novel.controller;
package com.java2nb.novel.controller.page;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@ -15,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestMapping;
public class PageController {
@RequestMapping("{url}.html")
public String module(@PathVariable("url") String url) {
return url;
@ -27,13 +26,14 @@ public class PageController {
}
@RequestMapping("{module}/{classify}/{url}.html")
public String module3(@PathVariable("module") String module, @PathVariable("classify") String classify, @PathVariable("url") String url) {
public String module3(@PathVariable("module") String module, @PathVariable("classify") String classify,
@PathVariable("url") String url) {
return module + "/" + classify + "/" + url;
}
/**
* 首页
* */
*/
@RequestMapping(path = {"/", "/index", "/index.html"})
public String index() {
return "crawl/crawlSource_list";

View File

@ -1,5 +1,6 @@
package com.java2nb.novel.controller;
package com.java2nb.novel.controller.page;
import com.java2nb.novel.controller.BaseController;
import com.java2nb.novel.core.bean.UserDetails;
import com.java2nb.novel.core.utils.ThreadLocalUtil;
import com.java2nb.novel.entity.*;