代码之家  ›  专栏  ›  技术社区  ›  thomas77

配置JsonProcessingExceptionMapper以登录Dropwizard

  •  4
  • thomas77  · 技术社区  · 7 年前

    我正在开发dropwizard应用程序。我需要将其配置为从 JsonProcessingExceptionMapper

    我的一些配置。yml文件:

    server:
    
    type: simple
    
    connector:
      type: http
      port: 0
    
    requestLog:
      appenders: []
    
    registerDefaultExceptionMappers: true
    

    一直在看 JsonProcessingExceptionMapper 而且是 showDetail 属性,但无法找到它。我正在使用dropwizard 1.2.3版

    1 回复  |  直到 7 年前
        1
  •  4
  •   thomas77    7 年前

    找到了。我没找到房子 detailedJsonProcessingExceptionMapper :

    server
      registerDefaultExceptionMappers: true
      detailedJsonProcessingExceptionMapper: true
    

    在文档中找不到此项。谁能给我指出正确的地方吗?