Announcement Announcement Module
Collapse
No announcement yet.
Not able to work <flex:message-broker/> and <context:component-scan .. together. Page Title Module
Move Remove Collapse
X
Conversation Detail Module
Collapse
  • Filter
  • Time
  • Show
Clear All
new posts

  • Not able to work <flex:message-broker/> and <context:component-scan .. together.

    I am having a hard time trying to use blazeds with spring,
    My AppContext File is
    Code:
    <?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:p="http://www.springframework.org/schema/p" 
            xmlns:flex="http://www.springframework.org/schema/flex" 
        xmlns:context="http://www.springframework.org/schema/context"
        xsi:schemaLocation="
            http://www.springframework.org/schema/beans 
            http://www.springframework.org/schem...-beans-3.0.xsd
            http://www.springframework.org/schema/context 
            http://www.springframework.org/schem...ontext-3.0.xsd
            http://www.springframework.org/schema/flex
            http://www.springframework.org/schema/flex/spring-flex-1.0.xsd">
    	
    	<flex:message-broker/> 
    	
    	<context:annotation-config/>
    	
    	<context:component-scan base-package="com.babc.server*"/>
    	
    	<bean id="multipartResolver"
              class="is.hax.spring.web.multipart.StreamingMultipartResolver">
              <property name="maxUploadSize" value="5000000" />
        </bean> 
    
    	<bean id="viewResolver" class="org.springframework.web.servlet.view.UrlBasedViewResolver">
      		<property name="viewClass" value="org.springframework.web.servlet.view.tiles2.TilesView"/>
    	</bean>
    	
    	<bean id="configurationLoader" class="org.springmodules.validation.bean.conf.loader.annotation.AnnotationBeanValidationConfigurationLoader"/>  
        <bean id="validator" class="org.springmodules.validation.bean.BeanValidator" p:configurationLoader-ref="configurationLoader"/>  
          
        <!-- Load messages -->  
         <bean id="messageSource"  
             class="org.springframework.context.support.ResourceBundleMessageSource"  
             p:basenames="errors"/>
        
    	<!-- Tiles -->
    	<bean id="tilesConfigurer" class="org.springframework.web.servlet.view.tiles2.TilesConfigurer">
    	  <property name="definitions">
    	    <list>
    	      <value>/WEB-INF/tiles/ui.xml</value>
    	      <value>/WEB-INF/tiles/admin.xml</value>
    	    </list>
    	  </property>
    	</bean>
    
    </beans>
    The problem is that when I introduced <flex:message-broker/> tag, the app controllers are not getting loaded and all pages show a 404 however blazeds is working fine and I am able to test it with SoapUI, when I remove this tag the pages are back.

  • #2
    This happens because installing the custom HandlerMapping/HandlerAdapter combination provided by Spring Flex essentially overrides the DispatcherServlet's defaults (see http://static.springsource.org/sprin...erServlet.html for more details on how that works).

    The solution introduced in Spring 3 to avoid having to manually re-define the default DispatcherServlet infrastructure is the mvc:annotation-driven tag. See:
    http://static.springsource.org/sprin...tml#mvc-config

    Comment

    Working...
    X