美文网首页
Sprint-boot: 修复406问题

Sprint-boot: 修复406问题

作者: KAMIWei | 来源:发表于2018-01-09 17:30 被阅读577次

出现406问题一般是由于url路径存在 ., 使得Spring进行了后缀匹配. 只要关掉后缀匹配即可.

public class Application extends WebMvcConfigurerAdapter {

  @Override
  public void configureContentNegotiation(ContentNegotiationConfigurer configurer) {
    configurer.favorPathExtension(false); // 关闭后缀服务器
  }

  public static void main(String[] args) {
    SpringApplication.run(Application.class, args);
  }
}

相关文章

  • Sprint-boot: 修复406问题

    出现406问题一般是由于url路径存在 ., 使得Spring进行了后缀匹配. 只要关掉后缀匹配即可.

  • 406~身体得到修复

    今天下午的午觉睡得简直舒服极了,持续的高压工作,绷紧的状态得到缓解感觉身体一下子轻便了很多,真的太舒服了。

  • fabric2.2 test-network通过fabric-j

    在idea中新建sprint-boot项目 https://github.com/wilesanGH/test-n...

  • 整合spring-boot与graphQL

    在sprint-boot中使用graphQL 简介 graphQL介绍 略 spring-boot介绍 略 需求 ...

  • Leetcode【406、763、861、1094】

    问题描述:【Sort】406. Queue Reconstruction by Height 解题思路: 这道题是...

  • Xcode 11.4.1 修复的问题汇总

    Xcode 11.4.1 修复的问题汇总Xcode 11.4.1 修复的问题汇总

  • Response code: 406

    【问题】JMeter接口请求失败,报错:Response code: 406Response message: N...

  • Fedora 问题修复

    1、 错误:Failed to synchronize cache for repo 'fedora'解决方法vi...

  • 热修复问题

    为什么Tinker不使用DexClassLoader加载再反射获取它里面的Element?而是要反射makePat...

  • 2018-05-25

    版本2版本 更新内容1.修复云播加载白屏问题 2.修复播放失败闪退bug3.修复云播图片加载空白问题 ...

网友评论

      本文标题:Sprint-boot: 修复406问题

      本文链接:https://www.haomeiwen.com/subject/qadgnxtx.html