Commits

Juan Carlos Picado Herrera committed 29d7ee4

ENCUESTAME-119, fixed mvc

Comments (0)

Files changed (14)

encuestame-mvc/pom.xml

                 </executions>
             </plugin>
         </plugins>
-        <testResources>
+<!--         <testResources>
             <testResource>
                 <directory>${basedir}/encuestame-war/src/main/webapp/WEB-INF/config</directory>
             </testResource>
             <testResource>
                 <directory>${basedir}/encuestame-war/src/main/webapp/WEB-INF/classes</directory>
             </testResource>
-        </testResources>
+        </testResources> -->
         <resources>
             <resource>
               <directory>src/main/resources/</directory>
               <includes>
-                <include>*.*</include>
+                <include>spring-test/*.*</include>
+                <include>properties-test/*.*</include>
               </includes>
               <filtering>true</filtering>
             </resource>

encuestame-mvc/src/main/resources/spring-test/encuestame-comet-context.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                        http://www.springframework.org/schema/context
+                        http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+    <!-- Commet @Components -->
+    <context:component-scan base-package="org.encuestame.comet" />
+
+</beans>

encuestame-mvc/src/main/resources/spring-test/encuestame-controller-context.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                        http://www.springframework.org/schema/context
+                        http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+  <!--
+    Maps requests to @Controllers based on @RequestMapping("path")
+    annotation values If no annotation-based path mapping is found, Spring
+    MVC proceeds to the next HandlerMapping (order=0 below).
+  -->
+  <bean
+    class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
+      <property name="interceptors">
+          <list>
+               <ref bean="enMeInterceptor"/>
+               <ref bean="openSessionInViewInterceptor"/>
+          </list>
+      </property>
+     <property name="order" value="0"/>
+  </bean>
+
+  <bean id="mobileInterceptor" class="org.springframework.mobile.device.DeviceResolverHandlerInterceptor" />
+  <bean id="enMeInterceptor" class=" org.encuestame.mvc.interceptor.DefaultEnMeInterceptor" />
+  <bean name="openSessionInViewInterceptor"
+            class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
+        <property name="sessionFactory">
+            <ref bean="sessionFactory" />
+        </property>
+        <property name="singleSession" value="true" />
+   </bean>
+
+
+  <!-- Scans for application @Components to deploy -->
+  <context:component-scan base-package="org.encuestame.mvc" />
+
+  <!--
+    Enables annotated @Controllers; responsible for invoking an annotated
+    POJO @Controller when one is mapped.
+  -->
+  <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
+        <property name="order" value="0"/>
+        <!--
+            NOTE: it is important to specify the order property, so this
+            adapter will be attempted before the HandlerAdapter that
+            Spring MVC automatically configures. This is because a
+            MappingJacksonHttpMessageConverter is registered
+            automatically with the default adapter that will attempt to
+            handle any Java object including BufferedImage.
+        -->
+        <property name="messageConverters">
+            <list>
+                <!-- Default converters -->
+                <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
+                <bean class="org.springframework.http.converter.FormHttpMessageConverter"/>
+                <bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter">
+                    <property name="supportedMediaTypes">
+                        <list>
+                            <value>image/jpeg</value>
+                        </list>
+                    </property>
+                </bean>
+                <bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/>
+
+                <!-- Converter for images -->
+                <bean class="org.encuestame.mvc.converter.EnhancedBufferedImageHttpMessageConverter"/>
+
+                <!-- Handle JAXB XML objects
+                <bean id="marshallingHttpMessageConverter"
+                 class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
+                    <constructor-arg>
+                        <bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
+                            <property name="classesToBeBound">
+                                <list>
+                                    <value>PictureFolders</value>
+                                    <value>Pictures</value>
+                                </list>
+                            </property>
+                        </bean>
+                    </constructor-arg>
+                </bean> -->
+
+                <!-- This must come after our image converter
+                <bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"/>
+                -->
+            </list>
+        </property>
+  </bean>
+</beans>

encuestame-mvc/src/main/resources/spring-test/encuestame-portlet-context.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
+
+</beans>

encuestame-mvc/src/main/resources/spring-test/encuestame-rss-context.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:si="http://www.springframework.org/schema/integration"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+       http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-1.0.xsd">
+
+    <!--
+    Read from RSS and send message some place.
+    <si:channel id="inputRssFeedChannel" />
+
+    <si:inbound-channel-adapter channel="inputRssFeedChannel"
+        ref="rssReader">
+        <si:poller max-messages-per-poll="1">
+            <si:interval-trigger interval="200" time-unit="SECONDS" />
+        </si:poller>
+    </si:inbound-channel-adapter>
+
+    <si:service-activator input-channel="inputRssFeedChannel" ref="rssFeedMessageHandler" />
+
+    <bean id="rssReader" class="org.encuestame.core.rss.EnMeRssReader"/>
+    <bean id="rssFeedMessageHandler" class="org.encuestame.core.rss.EnMeRssFeedMessageHandler"/>
+    -->
+
+    <bean id="tweetPollAtomFeedView" class="org.encuestame.mvc.view.TweetPollAtomFeedView"></bean>
+    <bean id="tweetPollRssFeedView" class="org.encuestame.mvc.view.TweetPollRssFeedView"></bean>
+</beans>

encuestame-mvc/src/main/resources/spring-test/encuestame-test-json-context.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+    xmlns:context="http://www.springframework.org/schema/context"
+    xmlns:mvc="http://www.springframework.org/schema/mvc"
+    xmlns:tx="http://www.springframework.org/schema/tx"
+    xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                        http://www.springframework.org/schema/context
+                        http://www.springframework.org/schema/context/spring-context-3.0.xsd
+                        http://www.springframework.org/schema/tx
+                        http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
+                        http://www.springframework.org/schema/mvc
+                        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
+
+      <tx:annotation-driven proxy-target-class="true"/>
+
+      <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
+
+      <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
+
+      <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
+          <property name="order" value="1"/>
+           <property name="mediaTypes">
+             <map>
+                <entry key="xml" value="application/xml" />
+                <entry key="json" value="application/json" />
+                <entry key="atom" value="application/atom+xml" />
+                <entry key="rss" value="application/rss+xml" />
+            </map>
+        </property>
+
+        <property name="defaultContentType" value="application/json" />
+        <property name="favorPathExtension" value="true" />
+
+
+        <property name="viewResolvers">
+            <list>
+                <bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
+            </list>
+        </property>
+
+        <property name="defaultViews">
+            <list>
+                <bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
+                      <property name="prefixJson" value="false"/>
+                      <property name="disableCaching" value="true"></property>
+                </bean>
+                <bean id="tweetPollAtomFeedView" class="org.encuestame.mvc.view.TweetPollAtomFeedView"></bean>
+                <bean id="tweetPollRssFeedView" class="org.encuestame.mvc.view.TweetPollRssFeedView"></bean>
+            </list>
+        </property>
+        <property name="ignoreAcceptHeader" value="true" />
+    </bean>
+
+    <!--
+    Maps requests to @Controllers based on @RequestMapping("path")
+    annotation values If no annotation-based path mapping is found, Spring
+    MVC proceeds to the next HandlerMapping (order=0 below).
+  -->
+  <bean
+    class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"><!--
+      <property name="interceptors"> <list>
+        <ref bean="openSessionInViewInterceptor"/> </list>
+      </property>
+  -->
+
+  </bean>
+
+  <!-- Scans for application @Components to deploy -->
+  <context:component-scan base-package="org.encuestame.mvc" />
+
+  <!--
+    Enables annotated @Controllers; responsible for invoking an annotated
+    POJO @Controller when one is mapped.
+  -->
+  <bean
+    class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
+  </bean>
+
+</beans>

encuestame-mvc/src/main/resources/spring-test/encuestame-upload-context.xml

+<?xml version="1.0" encoding="UTF-8"?>
+<beans xmlns="http://www.springframework.org/schema/beans"
+  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
+  xsi:schemaLocation="http://www.springframework.org/schema/beans
+                        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
+                        http://www.springframework.org/schema/context
+                        http://www.springframework.org/schema/context/spring-context-3.0.xsd">
+
+    <!-- thumbnail generator engine
+         thanks to raulraja.
+     -->
+    <bean id="thumbnailGeneratorEngine" class="org.encuestame.core.image.ThumbnailGeneratorEngineImpl">
+
+        <!-- the file extension for the thumbnail files -->
+        <property name="generatedExtension">
+            <value>.jpg</value>
+        </property>
+
+        <!-- the different sizes we want to generate, adjusting the aspect ratio based on the biggest dimension -->
+        <property name="supportedSizes">
+            <list>
+                <value>900</value>
+                <value>768</value>
+                <value>375</value>
+                <value>128</value>
+                <value>64</value>
+                <value>48</value>
+                <value>22</value>
+            </list>
+        </property>
+
+        <!-- mappings from the different content types to the right generator that handles each type -->
+        <property name="thumbnailGenerators">
+            <map>
+                <entry key="image/jpeg" value-ref="imageThumbnailGenerator" />
+                <entry key="image/jpg" value-ref="imageThumbnailGenerator" />
+                <entry key="image/pjpeg" value-ref="imageThumbnailGenerator" />
+                <entry key="image/gif" value-ref="imageThumbnailGenerator" />
+                <entry key="image/png" value-ref="imageThumbnailGenerator" />
+                <entry key="image/tiff" value-ref="imageThumbnailGenerator" />
+                <entry key="image/bmp" value-ref="imageThumbnailGenerator" />
+                <!--<entry key="application/pdf" value-ref="pdfThumbnailGenerator" />-->
+            </map>
+        </property>
+
+        <!-- A default thumbnail generator to be used for unregistered mime types -->
+        <property name="defaultThumbnailGenerator" ref="imageThumbnailGenerator"/>
+    </bean>
+
+    <!-- a thumbnail generator that generates thumbnails from images -->
+    <bean id="imageThumbnailGenerator" class="org.encuestame.core.image.ImageThumbnailGeneratorImpl" />
+
+</beans>

encuestame-mvc/src/test/java/org/encuestame/mvc/test/config/AbstractJsonMvcUnitBeans.java

 @Transactional
 @Scope("singleton")
 @ContextConfiguration(locations = {
-        "classpath:encuestame-test-json-context.xml",
-        "classpath:encuestame-rss-context.xml",
-        "classpath:encuestame-upload-context.xml",
-        "classpath:encuestame-param-test-context.xml" })
+        "classpath:spring-test/encuestame-test-json-context.xml",
+        "classpath:spring-test/encuestame-rss-context.xml",
+        "classpath:spring-test/encuestame-upload-context.xml",
+        "classpath:spring-test/encuestame-param-test-context.xml" })
 public abstract class AbstractJsonMvcUnitBeans extends AbstractSpringSecurityContext {
 
     /**

encuestame-mvc/src/test/resources/encuestame-comet-context.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans
-                        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                        http://www.springframework.org/schema/context
-                        http://www.springframework.org/schema/context/spring-context-3.0.xsd">
-
-    <!-- Commet @Components -->
-    <context:component-scan base-package="org.encuestame.comet" />
-
-</beans>

encuestame-mvc/src/test/resources/encuestame-controller-context.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans
-                        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                        http://www.springframework.org/schema/context
-                        http://www.springframework.org/schema/context/spring-context-3.0.xsd">
-
-  <!--
-    Maps requests to @Controllers based on @RequestMapping("path")
-    annotation values If no annotation-based path mapping is found, Spring
-    MVC proceeds to the next HandlerMapping (order=0 below).
-  -->
-  <bean
-    class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping">
-      <property name="interceptors">
-          <list>
-               <ref bean="enMeInterceptor"/>
-               <ref bean="openSessionInViewInterceptor"/>
-          </list>
-      </property>
-     <property name="order" value="0"/>
-  </bean>
-
-  <bean id="mobileInterceptor" class="org.springframework.mobile.device.DeviceResolverHandlerInterceptor" />
-  <bean id="enMeInterceptor" class=" org.encuestame.mvc.interceptor.DefaultEnMeInterceptor" />
-  <bean name="openSessionInViewInterceptor"
-            class="org.springframework.orm.hibernate3.support.OpenSessionInViewInterceptor">
-        <property name="sessionFactory">
-            <ref bean="sessionFactory" />
-        </property>
-        <property name="singleSession" value="true" />
-   </bean>
-
-
-  <!-- Scans for application @Components to deploy -->
-  <context:component-scan base-package="org.encuestame.mvc" />
-
-  <!--
-    Enables annotated @Controllers; responsible for invoking an annotated
-    POJO @Controller when one is mapped.
-  -->
-  <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
-        <property name="order" value="0"/>
-        <!--
-            NOTE: it is important to specify the order property, so this
-            adapter will be attempted before the HandlerAdapter that
-            Spring MVC automatically configures. This is because a
-            MappingJacksonHttpMessageConverter is registered
-            automatically with the default adapter that will attempt to
-            handle any Java object including BufferedImage.
-        -->
-        <property name="messageConverters">
-            <list>
-                <!-- Default converters -->
-                <bean class="org.springframework.http.converter.StringHttpMessageConverter"/>
-                <bean class="org.springframework.http.converter.FormHttpMessageConverter"/>
-                <bean class="org.springframework.http.converter.ByteArrayHttpMessageConverter">
-                    <property name="supportedMediaTypes">
-                        <list>
-                            <value>image/jpeg</value>
-                        </list>
-                    </property>
-                </bean>
-                <bean class="org.springframework.http.converter.xml.SourceHttpMessageConverter"/>
-
-                <!-- Converter for images -->
-                <bean class="org.encuestame.mvc.converter.EnhancedBufferedImageHttpMessageConverter"/>
-
-                <!-- Handle JAXB XML objects
-                <bean id="marshallingHttpMessageConverter"
-                 class="org.springframework.http.converter.xml.MarshallingHttpMessageConverter">
-                    <constructor-arg>
-                        <bean id="jaxbMarshaller" class="org.springframework.oxm.jaxb.Jaxb2Marshaller">
-                            <property name="classesToBeBound">
-                                <list>
-                                    <value>PictureFolders</value>
-                                    <value>Pictures</value>
-                                </list>
-                            </property>
-                        </bean>
-                    </constructor-arg>
-                </bean> -->
-
-                <!-- This must come after our image converter
-                <bean class="org.springframework.http.converter.json.MappingJacksonHttpMessageConverter"/>
-                -->
-            </list>
-        </property>
-  </bean>
-</beans>

encuestame-mvc/src/test/resources/encuestame-portlet-context.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans
-       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd">
-
-</beans>

encuestame-mvc/src/test/resources/encuestame-rss-context.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:si="http://www.springframework.org/schema/integration"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans
-       http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-       http://www.springframework.org/schema/integration http://www.springframework.org/schema/integration/spring-integration-1.0.xsd">
-
-    <!--
-    Read from RSS and send message some place.
-    <si:channel id="inputRssFeedChannel" />
-
-    <si:inbound-channel-adapter channel="inputRssFeedChannel"
-        ref="rssReader">
-        <si:poller max-messages-per-poll="1">
-            <si:interval-trigger interval="200" time-unit="SECONDS" />
-        </si:poller>
-    </si:inbound-channel-adapter>
-
-    <si:service-activator input-channel="inputRssFeedChannel" ref="rssFeedMessageHandler" />
-
-    <bean id="rssReader" class="org.encuestame.core.rss.EnMeRssReader"/>
-    <bean id="rssFeedMessageHandler" class="org.encuestame.core.rss.EnMeRssFeedMessageHandler"/>
-    -->
-
-    <bean id="tweetPollAtomFeedView" class="org.encuestame.mvc.view.TweetPollAtomFeedView"></bean>
-    <bean id="tweetPollRssFeedView" class="org.encuestame.mvc.view.TweetPollRssFeedView"></bean>
-</beans>

encuestame-mvc/src/test/resources/encuestame-test-json-context.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
-    xmlns:context="http://www.springframework.org/schema/context"
-    xmlns:mvc="http://www.springframework.org/schema/mvc"
-    xmlns:tx="http://www.springframework.org/schema/tx"
-    xsi:schemaLocation="http://www.springframework.org/schema/beans
-                        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                        http://www.springframework.org/schema/context
-                        http://www.springframework.org/schema/context/spring-context-3.0.xsd
-                        http://www.springframework.org/schema/tx
-                        http://www.springframework.org/schema/tx/spring-tx-3.0.xsd
-                        http://www.springframework.org/schema/mvc
-                        http://www.springframework.org/schema/mvc/spring-mvc-3.0.xsd">
-
-      <tx:annotation-driven proxy-target-class="true"/>
-
-      <bean class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"/>
-
-      <bean class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter"/>
-
-      <bean class="org.springframework.web.servlet.view.ContentNegotiatingViewResolver">
-          <property name="order" value="1"/>
-           <property name="mediaTypes">
-             <map>
-                <entry key="xml" value="application/xml" />
-                <entry key="json" value="application/json" />
-                <entry key="atom" value="application/atom+xml" />
-                <entry key="rss" value="application/rss+xml" />
-            </map>
-        </property>
-
-        <property name="defaultContentType" value="application/json" />
-        <property name="favorPathExtension" value="true" />
-
-
-        <property name="viewResolvers">
-            <list>
-                <bean class="org.springframework.web.servlet.view.BeanNameViewResolver" />
-            </list>
-        </property>
-
-        <property name="defaultViews">
-            <list>
-                <bean class="org.springframework.web.servlet.view.json.MappingJacksonJsonView">
-                      <property name="prefixJson" value="false"/>
-                      <property name="disableCaching" value="true"></property>
-                </bean>
-                <bean id="tweetPollAtomFeedView" class="org.encuestame.mvc.view.TweetPollAtomFeedView"></bean>
-                <bean id="tweetPollRssFeedView" class="org.encuestame.mvc.view.TweetPollRssFeedView"></bean>
-            </list>
-        </property>
-        <property name="ignoreAcceptHeader" value="true" />
-    </bean>
-
-    <!--
-    Maps requests to @Controllers based on @RequestMapping("path")
-    annotation values If no annotation-based path mapping is found, Spring
-    MVC proceeds to the next HandlerMapping (order=0 below).
-  -->
-  <bean
-    class="org.springframework.web.servlet.mvc.annotation.DefaultAnnotationHandlerMapping"><!--
-      <property name="interceptors"> <list>
-        <ref bean="openSessionInViewInterceptor"/> </list>
-      </property>
-  -->
-
-  </bean>
-
-  <!-- Scans for application @Components to deploy -->
-  <context:component-scan base-package="org.encuestame.mvc" />
-
-  <!--
-    Enables annotated @Controllers; responsible for invoking an annotated
-    POJO @Controller when one is mapped.
-  -->
-  <bean
-    class="org.springframework.web.servlet.mvc.annotation.AnnotationMethodHandlerAdapter">
-  </bean>
-
-</beans>

encuestame-mvc/src/test/resources/encuestame-upload-context.xml

-<?xml version="1.0" encoding="UTF-8"?>
-<beans xmlns="http://www.springframework.org/schema/beans"
-  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:context="http://www.springframework.org/schema/context"
-  xsi:schemaLocation="http://www.springframework.org/schema/beans
-                        http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
-                        http://www.springframework.org/schema/context
-                        http://www.springframework.org/schema/context/spring-context-3.0.xsd">
-
-    <!-- thumbnail generator engine
-         thanks to raulraja.
-     -->
-    <bean id="thumbnailGeneratorEngine" class="org.encuestame.core.image.ThumbnailGeneratorEngineImpl">
-
-        <!-- the file extension for the thumbnail files -->
-        <property name="generatedExtension">
-            <value>.jpg</value>
-        </property>
-
-        <!-- the different sizes we want to generate, adjusting the aspect ratio based on the biggest dimension -->
-        <property name="supportedSizes">
-            <list>
-                <value>900</value>
-                <value>768</value>
-                <value>375</value>
-                <value>128</value>
-                <value>64</value>
-                <value>48</value>
-                <value>22</value>
-            </list>
-        </property>
-
-        <!-- mappings from the different content types to the right generator that handles each type -->
-        <property name="thumbnailGenerators">
-            <map>
-                <entry key="image/jpeg" value-ref="imageThumbnailGenerator" />
-                <entry key="image/jpg" value-ref="imageThumbnailGenerator" />
-                <entry key="image/pjpeg" value-ref="imageThumbnailGenerator" />
-                <entry key="image/gif" value-ref="imageThumbnailGenerator" />
-                <entry key="image/png" value-ref="imageThumbnailGenerator" />
-                <entry key="image/tiff" value-ref="imageThumbnailGenerator" />
-                <entry key="image/bmp" value-ref="imageThumbnailGenerator" />
-                <!--<entry key="application/pdf" value-ref="pdfThumbnailGenerator" />-->
-            </map>
-        </property>
-
-        <!-- A default thumbnail generator to be used for unregistered mime types -->
-        <property name="defaultThumbnailGenerator" ref="imageThumbnailGenerator"/>
-    </bean>
-
-    <!-- a thumbnail generator that generates thumbnails from images -->
-    <bean id="imageThumbnailGenerator" class="org.encuestame.core.image.ImageThumbnailGeneratorImpl" />
-
-</beans>