Class ImageFileController<E extends ImageFile,​D extends ImageFileDao<E>,​S extends ImageFileService<E,​D>>

    • Constructor Detail

      • ImageFileController

        public ImageFileController()
        Default constructor, which calls the type-constructor
      • ImageFileController

        protected ImageFileController​(Class<E> entityClass)
        Constructor that sets the concrete entity class for the controller. Subclasses MUST call this constructor.
    • Method Detail

      • setService

        @Autowired
        @Qualifier("imageFileService")
        public void setService​(S service)
        We have to use Qualifier to define the correct service here. Otherwise, spring can not decide which service has to be autowired here as there are multiple candidates.
        Overrides:
        setService in class FileController<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