Package de.terrestris.shoguncore.web
Class ImageFileController<E extends ImageFile,D extends ImageFileDao<E>,S extends ImageFileService<E,D>>
- java.lang.Object
-
- de.terrestris.shoguncore.web.AbstractWebController<E,D,S>
-
- de.terrestris.shoguncore.web.FileController<E,D,S>
-
- de.terrestris.shoguncore.web.ImageFileController<E,D,S>
-
@Controller @RequestMapping("/image") public class ImageFileController<E extends ImageFile,D extends ImageFileDao<E>,S extends ImageFileService<E,D>> extends FileController<E,D,S>- Author:
- Johannes Weskamm, Daniel Koch
-
-
Field Summary
-
Fields inherited from class de.terrestris.shoguncore.web.AbstractWebController
logger, service
-
-
Constructor Summary
Constructors Modifier Constructor Description ImageFileController()Default constructor, which calls the type-constructorprotectedImageFileController(Class<E> entityClass)Constructor that sets the concrete entity class for the controller.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.http.ResponseEntity<?>getThumbnail(Integer id)Gets an image from the database by the given idvoidsetService(S service)We have to useQualifierto define the correct service here.-
Methods inherited from class de.terrestris.shoguncore.web.FileController
getFile, uploadFile
-
Methods inherited from class de.terrestris.shoguncore.web.AbstractWebController
getEntityClass, getService
-
-
-
-
Method Detail
-
setService
@Autowired @Qualifier("imageFileService") public void setService(S service)We have to useQualifierto define the correct service here. Otherwise, spring can not decide which service has to be autowired here as there are multiple candidates.- Overrides:
setServicein classFileController<E extends ImageFile,D extends ImageFileDao<E>,S extends ImageFileService<E,D>>- Parameters:
service- the service to set
-
getThumbnail
@RequestMapping(value="/getThumbnail.action", method=GET) public org.springframework.http.ResponseEntity<?> getThumbnail(@RequestParam Integer id)Gets an image from the database by the given id
-
-