Browse Source

fix 修复接口单参数校验无效问题

疯狂的狮子li 4 years ago
parent
commit
59006cb931
1 changed files with 1 additions and 0 deletions
  1. 1 0
      ruoyi-generator/src/main/resources/vm/java/controller.java.vm

+ 1 - 0
ruoyi-generator/src/main/resources/vm/java/controller.java.vm

@@ -33,6 +33,7 @@ import io.swagger.annotations.ApiOperation;
  * @author ${author}
  * @date ${datetime}
  */
+@Validated
 @Api(value = "${functionName}控制器", tags = {"${functionName}管理"})
 @RequiredArgsConstructor(onConstructor_ = @Autowired)
 @RestController