jax-rs jersey: Exception Mapping for Enum bound FormParam

后端 未结 2 573
挽巷
挽巷 2021-01-20 06:37

I am building a REST application, which is running on Glassfish 3, and having trouble handling the case when a parameter is bound to an enum:

 @FormParam(\"s         


        
2条回答
  •  自闭症患者
    2021-01-20 07:03

    Hint: It is necessary that MyException extends WebApplicationException. Other exceptions (like an IllegalArgumentException for example) are not handled by any provider in that scope (when parsing the reqest).

提交回复
热议问题