Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我正在使用 @Length(min=constant) 注释,它接受常量的值,该值必须是一个常量表达式,如最终值。我想使用 JMX 更改该值,但不能将 min 设置为一些不是最终的变量。如果 JMX 不是最终值,我该如何更改它?
抱歉,您不能在运行时将参数更改为 Validator 注释。它们在编译时必须是常数值。