> For the complete documentation index, see [llms.txt](https://bernardo.gitbook.io/development-docs-java/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://bernardo.gitbook.io/development-docs-java/spring-integration/routing.md).

# Routing

## Header Value

```markup
<si:header-value-router input-channel="employeeChannel" header-name="EVENT_TYPE">
  <si:mapping value="employeeChangeRequest" channel="employeeChangeChannel" />
  <si:mapping value="employeeDeleteRequest" channel="employeeDeleteChannel" />
</si:header-value-router>
```

## Custom

```java
public class EmployeeRouter
{

   public EmployeeRouter()
   {
      super();
   }

   @Override
   @Router
   public final String route(final Employee employee)
   {
      final String channel;

      // Set channel name

      return channel;
   }

}
```

The router should be initialized into the Spring context.

```markup
<si:router input-channel="employeeChannel"
   ref="employeeRouter" />
```
