I'm trying to use @Autowired for a file storage service, but apparently I'm doing it wrong.
I'm currently trying to create a file upload service using Spring Boot on Eclipse.
@PostMapping("/upload")
public String onUpload(@RequestParam("file") MultipartFile file, CVtestForm cvForm, RedirectAttributes redirectAttributes) throws IOException {
@Autowired
StorageService storageService;
return "upload_show";
}
I'm expecting storageService be wired to FileStorageService, which implements it.