mirror of
https://github.com/201206030/novel.git
synced 2025-07-05 04:46:38 +00:00
首页新增一套模板
This commit is contained in:
@ -3,6 +3,7 @@ package xyz.zinglizingli.books.web;
|
||||
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
@ -27,6 +28,9 @@ import java.util.Map;
|
||||
@Slf4j
|
||||
public class IndexController {
|
||||
|
||||
@Value("${index.template}")
|
||||
private String indexTemplate;
|
||||
|
||||
|
||||
private final BookService bookService;
|
||||
|
||||
@ -66,6 +70,6 @@ public class IndexController {
|
||||
modelMap.put("hotBooks", hotBooks);
|
||||
modelMap.put("newBooks", newBooks);
|
||||
|
||||
return "books/index";
|
||||
return "books/index_"+indexTemplate;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user