verystrongjoe
verystrongjoe

Reputation: 3921

Is there any workaround for using channel name with dash character using spring integration 4 without xml?

I upgraded my spring integration 3.x to 4.x. And I removed all xml configuration and replace to java annotation in pojo files. But the problem is..

I want to use the channel name with '-' character. It is very good to recognize and distinguish each words in name. Besides, if the dash character is include, I can be sure it is a channel.

But, using dash character in naming method is not allowed. How can I solve this situation??

Upvotes: 1

Views: 397

Answers (1)

Artem Bilan
Artem Bilan

Reputation: 121542

You just missed the simple hook from Spring Annotation configuration:

@Bean(name = "my-channel-with-dashes")
public MessageChannel myMessageChannel() {
    return new DirectChannel();
}

Upvotes: 1

Related Questions