码迷,mamicode.com
首页 > 其他好文 > 详细

Thymeleaf后台传值读取

时间:2019-08-17 10:54:49      阅读:69      评论:0      收藏:0      [点我收藏+]

标签:charset   Fix   script   include   mis   control   XML   ppi   java   

技术图片

技术图片

 

 

 

/**
 * 测试用Controller
 *
 * @author
 * @date 2019-08-15
 */
@Controller
@RequestMapping("/danyu/test")
public class DanyuTestController extends BaseController
{
    private String prefix = "danyu/test";


    @RequiresPermissions("danyu:test:view")
    @GetMapping()//@RequestMapping(method = RequestMethod.GET)
    public String test(Map<String,Object> model)
    {
        model.put("ttttttt", "我是你大爷啊啊");
        model.put("aaaaaaa", "123");
        return prefix + "/test";
    }

    
}

 

 

<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org" xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />  
<head>
    <th:block th:include="include :: header(‘爱上对方‘)" />
</head>
  <body>
    <span th:text="${ttttttt}">Sebastian</span>
    <th:block th:include="include :: footer" />
    <script th:inline="javascript">
            
    </script>
  </body>
</html>

Thymeleaf后台传值读取

标签:charset   Fix   script   include   mis   control   XML   ppi   java   

原文地址:https://www.cnblogs.com/object360/p/11367638.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!