The Spring BlazeDS Integration Test Drive consists of a series of samples running “out-of-the-box” that allow you to get up and running integrating Flex (and Adobe AIR) with Spring in minutes.
- Download the Spring/Flex Test Drive.
- Unzip it in your root directory.
- Navigate to /spring-flex-testdrive-1.0.3/tomcat/bin and start Tomcat (for instance: catalina run).
- Open a browser and access http://localhost:8400/spring-flex-testdrive.
- Follow the instructions.
Importing the Projects in Flash Builder 4
In Flash Builder 4, click File > Import > General > Existing Projects into Workspace.
- Specify spring-flex-testdrive-1.0.3/projects as the root directory and click finish.
In web.xml, the DispatcherServlet is configured to bootstrap the Spring WebApplicationContext as usual. In this simple configuration, all the /messagebroker requests are mapped to the DispatcherServlet.
In flex-servlet.xml, the BlazeDS message broker is configured as a Spring-managed bean using the simple message-broker tag. This will bootstrap the BlazeDS message broker.
With the message-broker in place, the Spring beans are configured as usual, and exposed for remote access using the remoting-destination tag.
In this Test Drive, we split the configuration into multiple xml files:
The application-specific beans are configured in spring/app-config.xml and exposed as remoting destinations in flex-servlet.xml.
- The beans that provide the basic infrastructure for the application (Database access and JMS integration) are configured in spring/infrastructure-config.xml.
- Security is configured in spring/security-config.xml. For the purpose of this introduction, we use a basic authentication provider.
In your own web application, you can use a different configuration arrangement, including single-file configuration.