头部引入了thymeleaf

<html xmlns="http://www.w3.org/1999/xhtml" xmlns:th="http://www.thymeleaf.org">

在html中使用

<div><input value="${abilityName}"/></div>

页面展示

经排查,使用方法不对

因为每个模板有自己的取值语法,thymeleaf用的是下面这种

<div><input th:value="${abilityName}"/></div>

在js中调用方式,已一个ajax请求参数为例

$.ajax({

        url:'/ability/listChartData',

        type:'post',

        async : true,

        dataType:"json",

        data:{

            'abilityName':`[[${abilityName}]]`,

            'calType':`[[${calType}]]`

        },

        success:function(data){

            myChart.hideLoading();

            // 使用刚指定的配置项和数据显示图表。

            myChart.setOption({

                legend: {

                    data: data.legendData,//data.legendData,

                    selected: data.selected

                },

                series: [{

                    data:  data.seriesData,

                }]

            });

        },

        error:function(){

            myChart.hideLoading();

        }

Thymeleaf模板引擎与springboot关联后,在html中无法使用el表达式获取model存的值的更多相关文章

  1. Thymeleaf模板引擎的初步使用

    在springboot中,推荐使用的模板引擎是Thymeleaf模板引擎,它提供了完美的Spring MVC的支持.下面就简单的介绍一下Thymeleaf模板引擎的使用. 在controller层中, ...

  2. SpringBoot使用thymeleaf模板引擎

    (1).添加pom依赖 <dependency> <groupId>org.springframework.boot</groupId> <artifactI ...

  3. (二)SpringBoot基础篇- 静态资源的访问及Thymeleaf模板引擎的使用

    一.描述 在应用系统开发的过程中,不可避免的需要使用静态资源(浏览器看的懂,他可以有变量,例:HTML页面,css样式文件,文本,属性文件,图片等): 并且SpringBoot内置了Thymeleaf ...

  4. 【Springboot】Springboot整合Thymeleaf模板引擎

    Thymeleaf Thymeleaf是跟Velocity.FreeMarker类似的模板引擎,它可以完全替代JSP,相较与其他的模板引擎,它主要有以下几个特点: 1. Thymeleaf在有网络和无 ...

  5. SpringBoot入门篇--使用Thymeleaf模板引擎进行页面的渲染

    在做WEB开发的时候,我们不可避免的就是在前端页面之间进行跳转,中间进行数据的查询等等操作.我们在使用SpringBoot之前包括我在内其实大部分都是用的是JSP页面,可以说使用的已经很熟悉.但是我们 ...

  6. SpringBoot:2.SpringBoot整合Thymeleaf模板引擎渲染web视图

    在Web开发过程中,Spring Boot可以通过@RestController来返回json数据,那如何渲染Web页面?Spring Boot提供了多种默认渲染html的模板引擎,主要有以下几种: ...

  7. 九、SpringBoot集成Thymeleaf模板引擎

    Thymeleaf咋读!??? 呵呵,是不是一脸懵逼...哥用我的大学四级英文知识告诉你吧:[θaimlif]. 啥玩意?不会音标?...那你就这样叫它吧:“赛母李府”,大部分中国人是听不出破绽的.. ...

  8. SpringBoot--- Shiro(拦截,认证)、Thymeleaf(模板引擎)

    SpringBoot--- Shiro(拦截,认证).Thymeleaf(模板引擎) 环境 IDEA :2020.1 SpringBoot: 2.3.3 Java : 8 版本依赖: ​ shiro- ...

  9. 三、thymeleaf模板引擎构建前台html, 后台使用 ModelAndView 和 Model 模型

    项目源码:https://github.com/y369q369/springBoot.git      ->     thymeleaf 私聊QQ: 1486866853 1.pom.xml中 ...

随机推荐

  1. iptables 配置 场景1

    这样配置完成后,没法完成本地回环,需要对lo网卡进行配置 本地报文无法发出,继续添加规则

  2. Flutter Container容器组件、Text文本组件详解

    import 'package:flutter/material.dart'; void main(){ runApp(MyApp()); } class MyApp extends Stateles ...

  3. Dart接口

    /* 和Java一样,dart也有接口,但是和Java还是有区别的. 首先,dart的接口没有interface关键字定义接口,而是普通类或抽象类都可以作为接口被实现. 同样使用implements关 ...

  4. 【转载】 谷歌集群数据分析 clusterdata-2011-2

    原文地址: https://www.twblogs.net/a/5c2dc304bd9eee35b21c418b/zh-cn ------------------------------------- ...

  5. IDEA子项目的相互依赖

    A项目依赖B项目 一.B项目打包,执行install 这一步其实就是把你的项目打包到本地仓库,你可以在本地仓库看到相应的jar包 二.在A项目的pom.xml引入依赖可以了 当B项目修改后,需要重新打 ...

  6. Python高级笔记(七)魔法属性

    1. 私有属性 名字重整 print(Test.__dict__) {'__weakref__': <attribute '__weakref__' of 'Test' objects>, ...

  7. 【helm & Tiller】报错Error: incompatible versions client[v2.14.1] server[v2.13.0] │

    helm是helm的客户端部分 tiller是helm的服务器端部分 报错 报错Error: incompatible versions client[v2.14.1] server[v2.13.0] ...

  8. 【Leetcode_easy】908. Smallest Range I

    problem 908. Smallest Range I solution: class Solution { public: int smallestRangeI(vector<int> ...

  9. iOS-UIDocumentInteractionController打开和预览文档

    iOS提供了使用其他app预览文件的支持,这就是Document Interaction Controller.此外,iOS也支持文件关联,允许其他程序调用你的app打开某种文件.而且,从4.2开始, ...

  10. c# .net 查找并安装CA根证书

    https CA根证书 用的是证书指纹来查找. 在用 collection.Find 之前 ,X509Store 一定要打开(Open),否则找到的数量(X509Certificate2Collect ...