# mulesoft Spring Module - Full Documentation --- product: Spring Module version: 2.0 --- # Spring Module 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Spring Module enables Mule apps to use the Spring framework. Release Notes: [Spring Module Release Notes](https://docs.mulesoft.com/release-notes/connector/spring-module-release-notes) Exchange: [Spring Module](https://www.mulesoft.com/exchange/org.mule.modules/mule-spring-module/) ## Add Spring Module to Your Project In Anypoint Studio 7, Spring module is provided in the default configuration. In **Mule Palette**, search for "Spring" and drag the Authorization Filter operation to the Studio canvas. ## Configure Spring Module 1. Add the following configuration: ```xml ``` 2. Put the `beans.xml` file in `src/main/resources`. The Spring configuration must be valid. Here is an example beans.xml file: ```xml ``` You must export the beans files used with the Spring module for your application to start. See [How to Export Resources](https://docs.mulesoft.com/mule-runtime/latest/how-to-export-resources). If you are using Anypoint Studio 7.x, you don’t need to manually update the `mule-artifact.json` file. Because Mule also needs a descriptor where the Spring beans are declared, so the embedded packager within Studio automatically generates one with all the resources it picks up from the project. However, if you choose to declare the resources you need to export, then Studio packages only those resources. The following example enables you to declare your `beans.xml` file in `mule-artifact.json`: ```example { "name": "MyApp", "minMuleVersion": "4.2.1", "classLoaderModelLoaderDescriptor": { "id": "mule", "attributes": { "exportedResources": [ "/org/mule/myapp/beans.xml" ] } } } } ``` ## Spring Objects in Mule Components You can use Spring objects in Mule configuration components (for instance, to point to the Derby data source created with Spring beans) as follows: ```xml ``` ## Spring Properties Placeholders You cannot use the properties defined by Spring properties placeholders within your Mule app configuration; you can use them only in Spring configuration files. However, you can use properties defined in Mule through `` within Spring configuration files. ## Limitations of Spring Objects To use Spring module, consider implementation and injection limits: - Spring objects cannot implement Mule API lifecycle methods. - Spring objects cannot be injected with Mule API services. The only service that can be used is the `org.mule.runtime.api.artifact.Registry`, which can be used to access any other service within the Mule API. This can be accomplished by using `@PostConstruct` over a method to initialize the object and retrieve the Mule API service. ## Use Spring Security as a Security Manager > [!IMPORTANT] If you use Spring Framework 5.x with plain text passwords, you must prefix the > password value with `{noop}`. For example, the password `admin` would be `{noop}admin` instead. The Spring module supports the use of Spring security as a security manager in Mule apps. You must define an authentication manager in the Spring configuration file: ```xml ``` You can define a security manager within a Mule app that makes use of the Spring authentication manager like this: ```xml ``` ## Validate Authentication with the Spring Authorization Filter The Spring module adds support for a filter that fails if authentication cannot be validated using the Mule Security Manager: ```xml ``` The `http:basic-security-filter` tries to authenticate the user using basic authentication. If the request is authenticated successfully, Mule retrieves the username and uses it in the Spring `authorization-filter` to search for that user and to try to authorize the request against the authority ROLE\_ADMIN. ## See Also - [Property Placeholders in Mule Apps](https://docs.mulesoft.com/mule-runtime/latest/configuring-properties) - [Migrate the Spring Module to Mule 4](https://docs.mulesoft.com/mule-runtime/latest/) - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.0 --- # Spring Module 2.0 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Spring Module enables Mule apps to use the Spring framework. ## Configurations --- ### Config Spring configuration that enables you to define a set of spring XML files and create an application context with objects to use in the Mule artifact. #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Files

String

The Spring beans file.

x

Name

String

The identifier of this element used to reference it in other components.

x

## Operations ### Authorization Filter `` Authorizes users against a required set of authorities. #### Parameters
NameTypeDescriptionDefault ValueRequired

Required Authorities

String

The authorities that grants the user further access to the flow, for example, ROLE_ADMIN,ROLE_USER.

x

Error Mappings

Array of Error Mapping

Set of error mappings.

#### Throws - MULE:NOT\_PERMITTED - MULE:SERVER\_SECURITY ## Types ### Error Mapping
FieldTypeDescriptionDefault ValueRequired

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Source of the error.

Target

String

Target of the error.

x

### Delegate Security Provider
FieldTypeDescriptionDefault ValueRequired

Name

String

Provider name to reference.

x

Delegate Ref

String

Spring security manager.

x

Authentication Provider Ref

String

Authentication provider.

x

## See Also - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.1 --- # Spring Module 2.1 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Spring Module enables Mule apps to use the Spring framework. Release Notes: [Spring Module Release Notes](https://docs.mulesoft.com/release-notes/connector/spring-module-release-notes) Exchange: [Spring Module](https://www.mulesoft.com/exchange/org.mule.modules/mule-spring-module/) ## Add Spring Module to Your Project In Anypoint Studio 7, Spring module is provided in the default configuration. In **Mule Palette**, search for "Spring" and drag the Authorization Filter operation to the Studio canvas. ## Configure Spring Module 1. Add the following configuration: ```xml ``` 2. Put the `beans.xml` file in `src/main/resources`. The Spring configuration must be valid. Here is an example beans.xml file: ```xml ``` You must export the beans files used with the Spring module for your application to start. See [How to Export Resources](https://docs.mulesoft.com/mule-runtime/latest/how-to-export-resources). If you are using Anypoint Studio 7.x, you don’t need to manually update the `mule-artifact.json` file. Because Mule also needs a descriptor where the Spring beans are declared, so the embedded packager within Studio automatically generates one with all the resources it picks up from the project. However, if you choose to declare the resources you need to export, then Studio packages only those resources. The following example enables you to declare your `beans.xml` file in `mule-artifact.json`: ```example { "name": "MyApp", "minMuleVersion": "4.2.1", "classLoaderModelLoaderDescriptor": { "id": "mule", "attributes": { "exportedResources": [ "/org/mule/myapp/beans.xml" ] } } } } ``` ## Spring Objects in Mule Components You can use Spring objects in Mule configuration components (for instance, to point to the Derby data source created with Spring beans) as follows: ```xml ``` ## Spring Properties Placeholders You cannot use the properties defined by Spring properties placeholders within your Mule app configuration; you can use them only in Spring configuration files. However, you can use properties defined in Mule through `` within Spring configuration files. ## Limitations of Spring Objects To use Spring module, consider implementation and injection limits: - Spring objects cannot implement Mule API lifecycle methods. - Spring objects cannot be injected with Mule API services. The only service that can be used is the `org.mule.runtime.api.artifact.Registry`, which can be used to access any other service within the Mule API. This can be accomplished by using `@PostConstruct` over a method to initialize the object and retrieve the Mule API service. ## Use Spring Security as a Security Manager > [!IMPORTANT] If you use Spring Framework 5.x with plain text passwords, you must prefix the > password value with `{noop}`. For example, the password `admin` would be `{noop}admin` instead. The Spring module supports the use of Spring security as a security manager in Mule apps. You must define an authentication manager in the Spring configuration file: ```xml ``` You can define a security manager within a Mule app that makes use of the Spring authentication manager like this: ```xml ``` ## Validate Authentication with the Spring Authorization Filter The Spring module adds support for a filter that fails if authentication cannot be validated using the Mule Security Manager: ```xml ``` The `http:basic-security-filter` tries to authenticate the user using basic authentication. If the request is authenticated successfully, Mule retrieves the username and uses it in the Spring `authorization-filter` to search for that user and to try to authorize the request against the authority ROLE\_ADMIN. ## See Also - [Property Placeholders in Mule Apps](https://docs.mulesoft.com/mule-runtime/latest/configuring-properties) - [Migrate the Spring Module to Mule 4](https://docs.mulesoft.com/mule-runtime/latest/) - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.1 --- # Spring Module 2.1 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Spring Module enables Mule apps to use the Spring framework. ## Configurations --- ### Config Spring configuration that enables you to define a set of spring XML files and create an application context with objects to use in the Mule artifact. #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Files

String

The Spring beans file.

x

Name

String

The identifier of this element used to reference it in other components.

x

## Operations ### Authorization Filter `` Authorizes users against a required set of authorities. #### Parameters
NameTypeDescriptionDefault ValueRequired

Required Authorities

String

The authorities that grants the user further access to the flow, for example, ROLE_ADMIN,ROLE_USER.

x

Error Mappings

Array of Error Mapping

Set of error mappings.

#### Throws - MULE:NOT\_PERMITTED - MULE:SERVER\_SECURITY ## Types ### Error Mapping
FieldTypeDescriptionDefault ValueRequired

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Source of the error.

Target

String

Target of the error.

x

### Delegate Security Provider
FieldTypeDescriptionDefault ValueRequired

Name

String

Provider name to reference.

x

Delegate Ref

String

Spring security manager.

x

Authentication Provider Ref

String

Authentication provider.

x

## See Also - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.2 is-latest-version: true --- # Spring Module 2.2 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Spring Module enables Mule apps to use the Spring framework. Release Notes: [Spring Module Release Notes](https://docs.mulesoft.com/release-notes/connector/spring-module-release-notes) Exchange: [Spring Module](https://www.mulesoft.com/exchange/org.mule.modules/mule-spring-module/) ## Add Spring Module to Your Project In **Mule Palette**, search for "Spring" and drag the Authorization Filter operation to the Studio canvas. Starting with version 2.2.0, the Spring libraries that the module needs are defined at the configuration level instead of the module level. When you add the module to your project, Studio doesn’t load the Spring libraries automatically, and each Spring Module configuration sets up its own libraries. Existing apps that use earlier versions of the module continue to work. > [!IMPORTANT] Spring Module 2.2.0 and later supports Spring Framework 7 and Spring Security 7 > through the `spring:v7-config` element. The `spring:config` element, which uses Spring 6, is > deprecated. To use Spring 7, create a `spring:v7-config` configuration and complete the library > setup in [Set Up Spring 7 Libraries in the pom.xml File](https://docs.mulesoft.com/spring-module/latest/spring-xml-maven#spring7-libraries). ## Configure Spring Module 1. Add the following configuration: ```xml ``` > [!NOTE] To use Spring 6, use `` instead of ``. You can’t use > both elements in the same app. 2. Put the `beans.xml` file in `src/main/resources`. The Spring configuration must be valid. Here is an example beans.xml file: ```xml ``` You must export the beans files used with the Spring module for your application to start. See [How to Export Resources](https://docs.mulesoft.com/mule-runtime/latest/how-to-export-resources). If you are using Anypoint Studio 7.x, you don’t need to manually update the `mule-artifact.json` file. Because Mule also needs a descriptor where the Spring beans are declared, so the embedded packager within Studio automatically generates one with all the resources it picks up from the project. However, if you choose to declare the resources you need to export, then Studio packages only those resources. The following example enables you to declare your `beans.xml` file in `mule-artifact.json`: ```example { "name": "MyApp", "minMuleVersion": "4.2.1", "classLoaderModelLoaderDescriptor": { "id": "mule", "attributes": { "exportedResources": [ "/org/mule/myapp/beans.xml" ] } } } } ``` ## Spring Objects in Mule Components You can use Spring objects in Mule configuration components (for instance, to point to the Derby data source created with Spring beans) as follows: ```xml ``` ## Spring Properties Placeholders You cannot use the properties defined by Spring properties placeholders within your Mule app configuration; you can use them only in Spring configuration files. However, you can use properties defined in Mule through `` within Spring configuration files. ## Limitations of Spring Objects To use Spring module, consider implementation and injection limits: - Spring objects cannot implement Mule API lifecycle methods. - Spring objects cannot be injected with Mule API services. The only service that can be used is the `org.mule.runtime.api.artifact.Registry`, which can be used to access any other service within the Mule API. This can be accomplished by using `@PostConstruct` over a method to initialize the object and retrieve the Mule API service. ## Use Spring Security as a Security Manager > [!IMPORTANT] If you use Spring Framework 5.x with plain text passwords, you must prefix the > password value with `{noop}`. For example, the password `admin` would be `{noop}admin` instead. The Spring module supports the use of Spring security as a security manager in Mule apps. You must define an authentication manager in the Spring configuration file: ```xml ``` You can define a security manager within a Mule app that makes use of the Spring authentication manager like this: ```xml ``` ## Validate Authentication with the Spring Authorization Filter The Spring module adds support for a filter that fails if authentication cannot be validated using the Mule Security Manager: ```xml ``` The `http:basic-security-filter` tries to authenticate the user using basic authentication. If the request is authenticated successfully, Mule retrieves the username and uses it in the Spring `authorization-filter` to search for that user and to try to authorize the request against the authority ROLE\_ADMIN. ## See Also - [Property Placeholders in Mule Apps](https://docs.mulesoft.com/mule-runtime/latest/configuring-properties) - [Migrate the Spring Module to Mule 4](https://docs.mulesoft.com/mule-runtime/latest/) - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.2 is-latest-version: true --- # Spring Module 2.2 Reference > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Spring Module enables Mule apps to use the Spring framework. ## Configurations --- ### Config Spring configuration that enables you to define a set of spring XML files and create an application context with objects to use in the Mule artifact. This configuration uses Spring Framework 6 and Spring Security 6 and is deprecated. To use Spring 7, use [7 Config](#v7-config). #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Files

String

The Spring beans file.

x

Name

String

The identifier of this element used to reference it in other components.

x

### 7 Config `` Spring configuration that enables you to define a set of spring XML files and create an application context with objects to use in the Mule artifact. This configuration uses Spring Framework 7 and Spring Security 7. You can’t use it in the same app as [Config](#config). #### Parameters
NameTypeDescriptionDefault ValueRequired

Name

String

Name for this configuration. Connectors reference the configuration with this name.

x

Files

String

The Spring beans file.

x

Name

String

The identifier of this element used to reference it in other components.

x

## Operations ### Authorization Filter `` Authorizes users against a required set of authorities. #### Parameters
NameTypeDescriptionDefault ValueRequired

Required Authorities

String

The authorities that grants the user further access to the flow, for example, ROLE_ADMIN,ROLE_USER.

x

Error Mappings

Array of Error Mapping

Set of error mappings.

#### Throws - MULE:NOT\_PERMITTED - MULE:SERVER\_SECURITY ## Types ### Error Mapping
FieldTypeDescriptionDefault ValueRequired

Source

Enumeration, one of:

  • ANY

  • REDELIVERY_EXHAUSTED

  • TRANSFORMATION

  • EXPRESSION

  • SECURITY

  • CLIENT_SECURITY

  • SERVER_SECURITY

  • ROUTING

  • CONNECTIVITY

  • RETRY_EXHAUSTED

  • TIMEOUT

Source of the error.

Target

String

Target of the error.

x

### Delegate Security Provider
FieldTypeDescriptionDefault ValueRequired

Name

String

Provider name to reference.

x

Delegate Ref

String

Spring security manager.

x

Authentication Provider Ref

String

Authentication provider.

x

## See Also - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.0 --- # Spring Module XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/spring http://www.mulesoft.org/schema/mule/spring/current/mule-spring.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml org.mule.modules mule-spring-module x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `spring module`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.1 --- # Spring Module XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/spring http://www.mulesoft.org/schema/mule/spring/current/mule-spring.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml org.mule.modules mule-spring-module x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `spring module`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.2 is-latest-version: true --- # Spring Module XML and Maven Support > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Although you can manually code a Mule app in XML, it is more efficient to use Anypoint Studio. If you manually code a Mule runtime engine (Mule) app in XML, either from the Anypoint Studio XML editor or from a text editor, you can get access to the connector in your app by adding reference statements to both your XML Mule flow and the Apache Maven `pom.xml` file. When you add the connector in Studio, Studio automatically populates the XML code with the connector’s namespace and schema location. It also adds a dependency to the `pom.xml` file. ## Add a Namespace for the Connector Paste the following code inside the `` tag of the header of your configuration XML: ```xml http://www.mulesoft.org/schema/mule/spring http://www.mulesoft.org/schema/mule/spring/current/mule-spring.xsd ``` This example shows how the namespace statements are placed in the `` XML block: ```xml ``` ## Add a POM File Dependency The Apache Maven `pom.xml` file generated by Anypoint Studio contains dependencies for a Mule app. If you code a Mule app manually, include this XML snippet in your `pom.xml` file to enable access to this connector: ```xml org.mule.modules mule-spring-module x.x.x mule-plugin ``` Replace `x.x.x` with the version that corresponds to the connector you are using. To obtain the most up-to-date `pom.xml` file information: 1. Go to [Anypoint Exchange](https://www.mulesoft.com/exchange/). 2. In Exchange, click **Login** and supply your Anypoint Platform username and password. 3. In Exchange, search for `spring module`. 4. Select the connector. 5. Click **Dependency Snippets** near the upper right of the screen. ## Set Up Spring 7 Libraries in the pom.xml File Spring Module 2.2.0 and later defines the required Spring libraries at the configuration level. When you create a `spring:v7-config` configuration, Anypoint Studio and Anypoint Code Builder can display Spring 6 libraries (`spring-beans`, `spring-context`, and `spring-core`) as loaded. In Studio, selecting **Remove configured library** has no effect, and in Anypoint Code Builder, the required libraries parameter isn’t displayed. Don’t rely on the libraries shown in the configuration screen. To use Spring 7, manually edit the `pom.xml` file of your project. These steps apply to both Anypoint Studio and Anypoint Code Builder. 1. Add the Spring libraries as shared libraries in the `configuration` element of the `mule-maven-plugin`: ```xml org.springframework spring-beans org.springframework spring-context org.springframework spring-core org.springframework.security spring-security-config org.springframework.security spring-security-crypto org.springframework.security spring-security-core org.springframework.security spring-security-access ``` 2. Add the Spring 7 libraries as dependencies in the `dependencies` element: ```xml org.springframework spring-beans 7.0.9 org.springframework spring-context 7.0.9 org.springframework spring-core 7.0.9 org.springframework.security spring-security-config 7.1.1 org.springframework.security spring-security-crypto 7.1.1 org.springframework.security spring-security-core 7.1.1 org.springframework.security spring-security-access 7.1.1 ``` These are the library versions: - Spring Framework (`spring-beans`, `spring-context`, and `spring-core`): 7.0.9 - Spring Security (`spring-security-config`, `spring-security-crypto`, `spring-security-core`, and `spring-security-access`): 7.1.1 You must list each library as both a dependency and a shared library. The `spring-security-access` library is optional. Add it only if your app uses the legacy access API classes that Spring Security 7 moved to this library. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.0 --- # Troubleshooting Spring Module > For the full documentation index, see: https://docs.mulesoft.com/llms.txt To troubleshoot Spring Module, become familiar with the information about enabling verbose logging and interpreting commonly thrown messages. ## Enable Verbose Logging To get a better understanding of why an application’s interaction with Spring module is failing, temporarily enable verbose logging for the module. Remember to always disable the enhanced verbosity after troubleshooting, because it affects your Mule application performance. To enable verbose logging in the configuration file: 1. Access Anypoint Studio and navigate to the **Package Explorer** view. 2. Open your application’s project name. 3. Open the `src/main/resources` path folder. 4. Open the `log4j2.xml` file inside the folder. 5. Add an `` tag inside the `` tag: ```xml ... ... ``` 6. Save your application changes. 7. Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule Application**. ## Understand Common Throws Here is a list of common throw messages and how to interpret them: - MULE:NOT\_PERMITTED Occurs when there is a security restriction enforced by a filter; for example, when using the authorization filter of the Spring module. - MULE:SERVER\_SECURITY Occurs when there is a security error enforced by Mule runtime engine (Mule). ## See Also - [Salesforce Help](https://help.salesforce.com) - [Known Issues](https://help.salesforce.com/s/issues) --- product: Spring Module version: 2.1 --- # Troubleshooting Spring Module > For the full documentation index, see: https://docs.mulesoft.com/llms.txt To troubleshoot Spring Module, become familiar with the information about enabling verbose logging and interpreting commonly thrown messages. ## Enable Verbose Logging To get a better understanding of why an application’s interaction with Spring module is failing, temporarily enable verbose logging for the module. Remember to always disable the enhanced verbosity after troubleshooting, because it affects your Mule application performance. To enable verbose logging in the configuration file: 1. Access Anypoint Studio and navigate to the **Package Explorer** view. 2. Open your application’s project name. 3. Open the `src/main/resources` path folder. 4. Open the `log4j2.xml` file inside the folder. 5. Add an `` tag inside the `` tag: ```xml ... ... ``` 6. Save your application changes. 7. Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule Application**. ## Understand Common Throws Here is a list of common throw messages and how to interpret them: - MULE:NOT\_PERMITTED Occurs when there is a security restriction enforced by a filter; for example, when using the authorization filter of the Spring module. - MULE:SERVER\_SECURITY Occurs when there is a security error enforced by Mule runtime engine (Mule). ## See Also - [Salesforce Help](https://help.salesforce.com) - [Known Issues](https://help.salesforce.com/s/issues) --- product: Spring Module version: 2.2 is-latest-version: true --- # Troubleshooting Spring Module > For the full documentation index, see: https://docs.mulesoft.com/llms.txt To troubleshoot Spring Module, become familiar with the information about enabling verbose logging and interpreting commonly thrown messages. ## Enable Verbose Logging To get a better understanding of why an application’s interaction with Spring module is failing, temporarily enable verbose logging for the module. Remember to always disable the enhanced verbosity after troubleshooting, because it affects your Mule application performance. To enable verbose logging in the configuration file: 1. Access Anypoint Studio and navigate to the **Package Explorer** view. 2. Open your application’s project name. 3. Open the `src/main/resources` path folder. 4. Open the `log4j2.xml` file inside the folder. 5. Add an `` tag inside the `` tag: ```xml ... ... ``` 6. Save your application changes. 7. Click the project name in **Package Explorer** and then click **Run** > **Run As** > **Mule Application**. ## Understand Common Throws Here is a list of common throw messages and how to interpret them: - MULE:NOT\_PERMITTED Occurs when there is a security restriction enforced by a filter; for example, when using the authorization filter of the Spring module. - MULE:SERVER\_SECURITY Occurs when there is a security error enforced by Mule runtime engine (Mule). ## See Also - [Salesforce Help](https://help.salesforce.com) - [Known Issues](https://help.salesforce.com/s/issues) --- product: Spring Module version: 2.0 --- # Upgrading and Migrating Spring Module to Version 2.0 > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Upgrade Spring Module to version 2.x. ## Supported Upgrade Paths
From VersionTo Version

1.x

2.x

## Changes in This Release Spring Module 2.0 includes these changes. - Spring Module (and its dependencies) are now compilable and compatible only with Java 17. - To align with modern development practices and ensure continued compatibility with secure and supported libraries, Spring Module is upgraded from Spring 5.x to Spring 6.x. - The structure of the `spring:security-manager` element is updated to resolve validation issues with the DSL. Previously, `delegate-security-providers` could be defined directly within `spring:security-manager`. Now, all `spring:delegate-security-provider` elements must be wrapped within a new `spring:delegate-security-providers` element. - Old structure (no longer supported): ```xml ``` - New structure (required): ```xml ``` ## Upgrade Prerequisites Before you perform the upgrade, you must create a backup of your files, data, and configurations in case you need to restore them. ## Upgrade Steps Follow these steps to perform the upgrade: 1. In Anypoint Studio, right-click the project and select **Manage Dependencies** > **Manage Modules**. 2. Select `Spring Module - Mule 4` and click **Update version**. 3. Click **Apply and Close**. 4. Verify that the Spring Module dependency version is `2.0.0` in the `pom.xml` file in the Mule project. Alternatively, you can manually update the Spring Module dependency version in the `pom.xml` file in the Mule project, or simply add the updated module to the project. ### Verify the Upgrade After you upgrade the connector, follow these steps to verify the upgrade: 1. In Studio, verify that there are no errors in the **Problems** or **Console** views. 2. Verify that there are no problems in the project `pom.xml` file. 3. Test the connection to verify that the operations work. ## Troubleshoot If there are problems with caching the parameters and caching the metadata, try restarting Anypoint Studio. ### Revert the Upgrade If it is necessary to revert to the previous version of Spring Module, change the Spring Module dependency version `2.0.0` in the project’s `pom.xml` to the previous version. You must update the project’s `pom.xml` in Anypoint Studio. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Spring Module Reference](https://docs.mulesoft.com/spring-module/2.0/spring-module-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.1 --- # Upgrading and Migrating Spring Module to Version 2.x > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Upgrade Spring Module to version 2.x. ## Supported Upgrade Paths
From VersionTo Version

1.x

2.x

## Changes in This Release Spring Module 2.0 includes these changes. - Spring Module (and its dependencies) are now compilable and compatible only with Java 17. - To align with modern development practices and ensure continued compatibility with secure and supported libraries, Spring Module is upgraded from Spring 5.x to Spring 6.x. - The structure of the `spring:security-manager` element is updated to resolve validation issues with the DSL. Previously, `delegate-security-providers` could be defined directly within `spring:security-manager`. Now, all `spring:delegate-security-provider` elements must be wrapped within a new `spring:delegate-security-providers` element. - Old structure (no longer supported): ```xml ``` - New structure (required): ```xml ``` ## Upgrade Prerequisites Before you perform the upgrade, you must create a backup of your files, data, and configurations in case you need to restore them. ## Upgrade Steps Follow these steps to perform the upgrade: 1. In Anypoint Studio, right-click the project and select **Manage Dependencies** > **Manage Modules**. 2. Select `Spring Module - Mule 4` and click **Update version**. 3. Click **Apply and Close**. 4. Verify that the Spring Module dependency version is `2.0.0` in the `pom.xml` file in the Mule project. Alternatively, you can manually update the Spring Module dependency version in the `pom.xml` file in the Mule project, or simply add the updated module to the project. ### Verify the Upgrade After you upgrade the connector, follow these steps to verify the upgrade: 1. In Studio, verify that there are no errors in the **Problems** or **Console** views. 2. Verify that there are no problems in the project `pom.xml` file. 3. Test the connection to verify that the operations work. ## Troubleshoot If there are problems with caching the parameters and caching the metadata, try restarting Anypoint Studio. ### Revert the Upgrade If it is necessary to revert to the previous version of Spring Module, change the Spring Module dependency version `2.0.0` in the project’s `pom.xml` to the previous version. You must update the project’s `pom.xml` in Anypoint Studio. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Spring Module Reference](https://docs.mulesoft.com/spring-module/2.1/spring-module-reference) - [Salesforce Help](https://help.salesforce.com) --- product: Spring Module version: 2.2 is-latest-version: true --- # Upgrading and Migrating Spring Module to Version 2.x > For the full documentation index, see: https://docs.mulesoft.com/llms.txt Upgrade Spring Module to version 2.x. ## Supported Upgrade Paths
From VersionTo Version

1.x

2.x

## Changes in This Release Spring Module 2.0 includes these changes. - Spring Module (and its dependencies) are now compilable and compatible only with Java 17. - To align with modern development practices and ensure continued compatibility with secure and supported libraries, Spring Module is upgraded from Spring 5.x to Spring 6.x. - The structure of the `spring:security-manager` element is updated to resolve validation issues with the DSL. Previously, `delegate-security-providers` could be defined directly within `spring:security-manager`. Now, all `spring:delegate-security-provider` elements must be wrapped within a new `spring:delegate-security-providers` element. - Old structure (no longer supported): ```xml ``` - New structure (required): ```xml ``` ## Upgrade Prerequisites Before you perform the upgrade, you must create a backup of your files, data, and configurations in case you need to restore them. ## Upgrade Steps Follow these steps to perform the upgrade: 1. In Anypoint Studio, right-click the project and select **Manage Dependencies** > **Manage Modules**. 2. Select `Spring Module - Mule 4` and click **Update version**. 3. Click **Apply and Close**. 4. Verify that the Spring Module dependency version is `2.0.0` in the `pom.xml` file in the Mule project. Alternatively, you can manually update the Spring Module dependency version in the `pom.xml` file in the Mule project, or simply add the updated module to the project. ### Verify the Upgrade After you upgrade the connector, follow these steps to verify the upgrade: 1. In Studio, verify that there are no errors in the **Problems** or **Console** views. 2. Verify that there are no problems in the project `pom.xml` file. 3. Test the connection to verify that the operations work. ## Troubleshoot If there are problems with caching the parameters and caching the metadata, try restarting Anypoint Studio. ### Revert the Upgrade If it is necessary to revert to the previous version of Spring Module, change the Spring Module dependency version `2.0.0` in the project’s `pom.xml` to the previous version. You must update the project’s `pom.xml` in Anypoint Studio. ## See Also - [Introduction to Anypoint Connectors](https://docs.mulesoft.com/connectors/introduction/introduction-to-anypoint-connectors) - [Spring Module Reference](https://docs.mulesoft.com/spring-module/latest/spring-module-reference) - [Salesforce Help](https://help.salesforce.com)