Contact Us 1-800-596-4880

Using Mule with Spring

Mule Runtime Engine versions 3.5, 3.6, and 3.7 reached End of Life on or before January 25, 2020. For more information, contact your Customer Success Manager to determine how you can migrate to the latest Mule version.

Mule leverages the Spring framework for developing Java applications. M

Supported Spring Versions

  • Mule 3.8: Spring 4.1.9 and Spring Security 4.0.4

  • Mule 3.7.5: Spring 4.1.9 and Spring Security 4.0.4

  • Mule 3.7.0 - 3.7.4: Spring 4.1.6 and Spring Security 4.0.1

  • Mule 3.6 and earlier: Spring 3.2 and Spring Security 3.0

Mule App XML Configuration File

The most common way to configure Mule is with Spring XML files that use custom Mule namespaces.

Use one of the two namespaces in your spring framework schema in Mule:

  • http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd

  • http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-current.xsd

Spring Application Contexts

Mule offers several options for creating and managing Spring application contexts for your application.

  • Single application context

  • Multiple application context

  • Existing application context

  • Existing application context as parent

Build Spring beans to define component behaviors which Mule applications can reference.

Spring Bean Definition Profiles

Mule’s configuration file takes advantage of Spring 4.1’s ability to create bean definition profiles. You can use Spring bean definition profiles to register different beans for different target environments, instead of using one bean for all target environments. Refer to Spring’s blog posting for more information about bean definition profiles.