nkexbg.gallery-api.1.1.0.source-code.applicationContext.xml Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gallery-api Show documentation
Show all versions of gallery-api Show documentation
REST Webapp in Java for viewing a gallery of images and videos. Image rescaling as well as video transcoding is performed based on request parameters. No UI included. Purely API-based. Authentication via HTTP basic auth (per default). Supports different user roles.
<beans xmlns="http://www.springframework.org/schema/beans" xmlns:context="http://www.springframework.org/schema/context" xmlns:util="http://www.springframework.org/schema/util" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:p="http://www.springframework.org/schema/p" xsi:schemaLocation=" http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-4.3.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.3.xsd http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.3.xsd"> <bean id="galleryService" class="com.github.henkexbg.gallery.service.impl.GalleryServiceImpl"> <property name="galleryAuthorizationService" ref="galleryAuthorizationService" /> <property name="imageResizeService" ref="imageResizeService" /> <property name="videoConversionService" ref="videoConversionService" /> <property name="resizeDir" value="${gallery.resizeDir}" /> <property name="maxImageWidth" value="${gallery.imageResizing.maxImageWidth}" /> <property name="maxImageHeight" value="${gallery.imageResizing.maxImageHeight}" /> <property name="directoryImageMaxAgeMinutes" value="${gallery.imageResizing.directoryImageMaxAgeMinutes}" /> <property name="allowedFileExtensions" value="#{'${gallery.allowedFileExtensions}'.split(',')}"></property> </bean> <alias name="galleryAuthorizationServiceSS" alias="galleryAuthorizationService" /> <bean id="galleryAuthorizationServiceSS" class="com.github.henkexbg.gallery.service.impl.GalleryAuthorizationServiceSSImpl" /> <alias name="imageResizeServiceNative" alias="imageResizeService" /> <bean id="imageResizeServiceNative" class="com.github.henkexbg.gallery.service.impl.ImageResizeServiceImpl" /> <!-- The bean below can be activated to use ImageMagick instead of the java-based version. Testing showed that IM is slower though... --> <!-- <bean id="imageResizeServiceIM" class="com.github.henkexbg.gallery.service.impl.ImageResizeServiceIMImpl"> --> <!-- <property name="imageMagickPath" value="${gallery.imageMagickPath}" /> --> <!-- </bean> --> <bean id="galleryRootDirConfigJob" class="com.github.henkexbg.gallery.service.impl.GalleryRootDirConfigJob"> <property name="galleryRootDirChangeListeners"> <list> <ref bean="galleryAuthorizationService" /> </list> </property> <property name="configFile" value="${gallery.groupDirAuth.propertiesFile}" /> </bean> <bean id="videoConversionService" class="com.github.henkexbg.gallery.service.impl.VideoConversionServiceImpl"> <property name="conversionModes" ref="videoConversionModes" /> <property name="externalBinaryPath" value="${gallery.videoConversion.binary}" /> <property name="maxWaitTimeSeconds" value="${gallery.videoConversion.maxWaitTimeSeconds}" /> <property name="imageCommandTemplate" value="${gallery.videoConversion.imageCommandTemplate}" /> <property name="externalProcessErrorLogFile" value="${gallery.videoConversion.externalProcessErrorLogFile}" /> </bean> <bean id="videoBatchConversionJob" class="com.github.henkexbg.gallery.service.impl.VideoBatchConversionJob"> <property name="galleryService" ref="galleryService" /> <property name="galleryAuthorizationService" ref="galleryAuthorizationService" /> <property name="blacklistedVideosFilePath" value="${gallery.videoConversion.blacklistedVideosFile}" /> </bean> </beans>