SpringBoot2.0.0版本actuator监控配置

o.s.b.a.e.web.EndpointLinksResolver      : Exposing 2 endpoint(s) beneath base path '/actuator'
s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/health],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
s.b.a.e.w.s.WebMvcEndpointHandlerMapping : Mapped "{[/actuator/info],methods=[GET],produces=[application/vnd.spring-boot.actuator.v2+json || application/json]}" onto public java.lang.Object org.springframework.boot.actuate.endpoint.web.servlet.AbstractWebMvcEndpointHandlerMapping$OperationHandler.handle(javax.servlet.http.HttpServletRequest,java.util.Map<java.lang.String, java.lang.String>)
s.b.a.e.w.s.WebMvcEnd
  • 2
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
在Spring Boot中使用fastjson 2.0.0版本时,可以通过配置文件或代码方式来设置反序列化配置。以下是常见的配置方式: 1. 配置文件方式 在application.properties或application.yml文件中添加如下内容: ``` # 开启AutoType功能 spring.fastjson.parser.autoTypeSupport=true # 关闭ASM功能 spring.fastjson.parser.asmEnable=false ``` 2. 代码方式 在Spring Boot的启动类中,可以通过重写configureMessageConverters方法来设置fastjson的反序列化配置,例如: ``` @Configuration public class FastJsonConfig extends WebMvcConfigurationSupport { @Override public void configureMessageConverters(List<HttpMessageConverter<?>> converters) { FastJsonHttpMessageConverter converter = new FastJsonHttpMessageConverter(); FastJsonConfig config = new FastJsonConfig(); // 开启AutoType config.setAutoTypeSupport(true); // 关闭ASM config.setASMEnable(false); converter.setFastJsonConfig(config); converters.add(converter); } } ``` 注意,Spring Boot默认使用Jackson作为JSON处理库,如果想要使用fastjson,则需要排除Jackson并添加fastjson依赖,例如: ``` <dependency> <groupId>com.alibaba</groupId> <artifactId>fastjson</artifactId> <version>2.0.0</version> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> <exclusions> <exclusion> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-json</artifactId> </exclusion> </exclusions> </dependency> ``` 以上是一些常见的反序列化配置方式,具体的配置应该根据具体情况进行选择和设置,以确保安全和性能。建议仔细阅读fastjson的官方文档,并参考相关的安全规范和最佳实践。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值