Can not set field to com.sun.proxy.$Proxy

前端 未结 2 2088
终归单人心
终归单人心 2021-02-13 07:05

For file upload I am trying to inject and use a Validator in my Spring Controller like this:

@RestController
@RequestMapping(\"/api\")
public class FileControlle         


        
2条回答
  •  滥情空心
    2021-02-13 07:48

    Autowire the interface of FileValidator(class) in your class FileController. Doing this will not require you to specify @Qualifier as mentioned below:

    @Autowired
    IFileValidator filevalidator;
    

提交回复
热议问题