首页>代码>spring boot集成beetl极简入门实例>/springboot-beetl/src/main/java/com/simon/springbootbeetl/controller/HelloBeetlController.java
package com.simon.springbootbeetl.controller;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;

/**
 * @author simon
 */
@Controller
@RequestMapping("/home")
public class HelloBeetlController {

    private static Logger logger = LoggerFactory.getLogger(HelloBeetlController.class);

    /**
     * 测试beetl模板
     *
     * @return
     */
    @RequestMapping("/test")
    public ModelAndView home() {
        ModelAndView modelAndView = new ModelAndView();
        logger.info("test request");
        modelAndView.addObject("email", "simon@qq.com");
        modelAndView.setViewName("test");
        return modelAndView;
    }
}
最近下载更多
Seaskye  LV14 2023年11月4日
最代码官方  LV167 2023年5月7日
最近浏览更多
小旭123  LV1 4月28日
WBelong  LV7 3月27日
tiansitong  LV14 2023年12月24日
b5438b  LV7 2023年12月20日
cyz521213  LV1 2023年12月9日
Seaskye  LV14 2023年11月4日
微信网友_6658091507814400  LV3 2023年9月20日
www2222  LV2 2023年8月9日
yyh1252  LV8 2023年8月7日
shaoqi 2023年7月26日
暂无贡献等级
顶部 客服 微信二维码 底部
>扫描二维码关注最代码为好友扫描二维码关注最代码为好友