Newyorkcity
V2EX  ›  问与答

请问有办法把 spring validation 中的校验器提取出来使用吗?

  •  
  •   Newyorkcity · Jul 4, 2023 · 1150 views
    This topic created in 1243 days ago, the information mentioned may be changed or developed.
    如意,spring validation 使得 controller 层校验进入的请求体的内容变得很方便。但现在我想手动校验一个 POJO 实例,不知道有没有办法那那个校验器取出来让它对这个实例做校验?
    谢谢
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   1830 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 33ms · UTC 10:57 · PVG 18:57 · LAX 02:57 · JFK 05:57
    ♥ Do have faith in what you're doing.