Dmitry Klochkov
Dmitry Klochkov

Reputation: 2635

How to vizualize spring integration file in intellij idea 14?

On the page https://www.jetbrains.com/idea/whatsnew/ it is said that Intellij Idea 14 has got a visual diagrams for spring integration.

But I can't find how to visualize my integration xml file.

(right click on file)/Diagrams/Show Diagram... shows a diagram with links between the beans. It is not very usefull. enter image description here

Spring Integration Patterns plugin is enabled

I have Intellij Idea installed on a computer without access to the internet. May it be the reason why the diagrams are not working properly?

Upvotes: 6

Views: 9921

Answers (6)

Dmytro Melnychuk
Dmytro Melnychuk

Reputation: 2494

Yes, click on your Spring Integration context file > Diagrams > Show Diagram... > Spring Integration., but if you haven't this menu follow below:

  1. You should have identified integration context as Spring XML based configurations. Instruction here : Create a Intellij file set

  2. I don't know why, but I had a problem with Spring Integration Diagram when I installed Springirun plugin.

Upvotes: 0

mxg
mxg

Reputation: 16

The issue is that the newer versions of Intellij create separate modules per source set by default which somehow ends up conflicting with earlier setups. Using Intellij 2016.1, I instead reimported my project with the following options checked:

Gradle Import options

Once I did that then (right click on file)/Diagrams/Show Diagram once again gave me the Spring Integration Option.

Upvotes: 0

James
James

Reputation: 11

I had the same problem, and found that in addition to having the Spring facet enabled, and having the spring-integration-core dependency and having the relevant context file set as an application context under the facet, you also need to have just the containing module open. i.e. the stomp-chat spring-integration sample provides the "Spring Integration" diagram option if it is opened from its own pom.xml, however if you open the parent applications\pom.xml then the "Spring Integration" diagram option is not available, regardless of facets etc.

Upvotes: 1

Alex Cheung
Alex Cheung

Reputation: 11

This link helps - https://devnet.jetbrains.com/message/5529839#5529839

"Please make sure the XML file is correctly configured in Spring context setup via Spring facet. It requires spring-integration-core to be in module dependency of selected XML file."

Upvotes: 1

Startigers
Startigers

Reputation: 3

I have the same problem in a project where I use spring integration 2.1.4.

In a newer project I use 4.0.0 and there Intellij Idea offers the option to open the spring integration diagram.

Perhaps that is the reason and you "only" need a newer version of spring integration.

Upvotes: 0

Artem Bilan
Artem Bilan

Reputation: 121202

What do you want to see there?

For example.

We have stomp-chat sample: https://github.com/spring-projects/spring-integration-samples/tree/master/applications/stomp-chat

And here is a diagram for this config: https://github.com/spring-projects/spring-integration-samples/blob/master/applications/stomp-chat/src/main/resources/org/springframework/integration/samples/chat/stomp/server/stomp-server.xml

enter image description here

I'd say that it is OK, however I agree that it would better if I'd provide id attribute for all components.

Of course, Spring Integration Patterns plugin has to be switched on.

Upvotes: 4

Related Questions