MENU

Jakarta

更新一个老项目,Thymeleaf报错解决


今天重新Build了一个老项目,项目是mvc架构的,更新了SpringBoot版本之后,运行项目报错,是关于thymeleaf的报错,如下:


org.thymeleaf.exceptions.TemplateProcessingException: Only variable expressions returning numbers or booleans are allowed in this context, any other datatypes are not trusted in the context of this expression, including Strings or any other object that could be rendered as a text literal. A typical case is HTML attributes for event handlers (e.g. "onload"), in which textual data from variables should better be output to "data-*" attributes and then read from the event handler.

之后查了资料,发现需要更新变量的取出方式

修改前:

Read More

Spring Cloud Alibaba 2.2.0升级

核心依赖升级

  • Spring Cloud Hoxton.RELEASE
  • Seata 1.0.0
  • Sentinel 1.7.1
  • Apache Dubbo 2.7.4.1

更新日志

  • 新增 NacosConfigHealthIndicator ,服务状态Actuator
  • 优化 NacosWatch,重构线程池
  • 优化 NacosServiceRegistry 服务注册异常抛出
  • Seata 支持 Feign 新的负载均衡器 FeignBlockingLoadBalancerClient
  • 使用Spring Boot 2.2.1新特性 @Configuration(proxyBeanMethods=false) 减少无用代理开销
  • Nacos支持ReactiveDiscoveryClient
  • Sentinel 使用SentinelWebInterceptor 代替 CommonFilter
  • Nacos 相关配置增加默认的服务地址 localhost:8848
  • Sentinel 迁移为spring-cloud-circuitbreaker-sentinel
  • 优化RocketMQBinderConfigurationProperties#nameServer 配置格式
  • 增强支持 ribbon ConfigurationBasedServerList 配置
  • 增加属性 可以关闭 spring-cloud-circuitbreaker-sentinel 自动配置
  • 添加sharedConfigs 和 extensionConfigs 支持更灵活的配置读取
  • 修复 spring-cloud-alibaba-nacos-discovery服务状态始终为UP
  • 修复 spring-cloud-alibaba-dubbo NacosConfiguration 配置无效
  • 解决 spring-cloud-starter-nacos-config 解析配置文件数据类型转换异常问题
  • 解决 spring-cloud-starter-nacos-config 不按照 yml 顺序解析

其他

  • Spring Cloud Alibaba Sentinel 不再依赖 sentinel-web-servlet 实现,而是依赖 sentinel-spring-webmvc-dapter , 基于 Spring 的 Interceptor 拦截资源,而不再是 CommonFilter
  • 测试已经解决了之前Gateway注册到Nacos无法转发使用的问题 原文地址