@Controller @RequestMapping(value="/image") public class ImageFileController<E extends ImageFile,D extends ImageFileDao<E>,S extends ImageFileService<E,D>> extends FileController<E,D,S>
logger, service| Modifier | Constructor and Description |
|---|---|
|
ImageFileController()
Default constructor, which calls the type-constructor
|
protected |
ImageFileController(Class<E> entityClass)
Constructor that sets the concrete entity class for the controller.
|
| Modifier and Type | Method and Description |
|---|---|
org.springframework.http.ResponseEntity<?> |
getThumbnail(Integer id)
Gets an image from the database by the given id
|
void |
setService(S service)
We have to use
Qualifier to define the correct service here. |
getFile, uploadFilegetEntityClass, getServicepublic ImageFileController()
@Autowired @Qualifier(value="imageFileService") public void setService(S service)
Qualifier to define the correct service here.
Otherwise, spring can not decide which service has to be autowired here
as there are multiple candidates.setService in class FileController<E extends ImageFile,D extends ImageFileDao<E>,S extends ImageFileService<E,D>>service - the service to set@RequestMapping(value="/getThumbnail.action",
method=GET)
public org.springframework.http.ResponseEntity<?> getThumbnail(@RequestParam
Integer id)
Copyright © 2020 terrestris GmbH & Co. KG. All rights reserved.