Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 323
Dmitry Klochkov Avatar asked Dec 04 '14 11:12

Dmitry Klochkov


People also ask

How do I view beans in IntelliJ?

You can quickly find Spring Beans in your context files: simply press Ctrl+Alt+Shift+N (or invoke Symbol command from the Go To menu) and start typing a bean name — IntelliJ IDEA will find it for you in no time.

How do I add Spring Tool Suite in IntelliJ?

Enable Spring support in IntelliJ IDEAPress Ctrl+Alt+S to open the IDE settings and select Plugins. Open the Installed tab, search for Spring and make sure that the checkboxes next to all relevant plugins are selected.

How do I run an existing spring boot application in IntelliJ?

Run your Spring Boot application and open the Services tool window: select View | Tool Windows | Services or press Alt+8 . Select your running Spring Boot application and open the Actuator tab.


3 Answers

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.

like image 69
Artem Bilan Avatar answered Oct 09 '22 08:10

Artem Bilan


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."

like image 30
Alex Cheung Avatar answered Oct 09 '22 07:10

Alex Cheung


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.

like image 36
James Avatar answered Oct 09 '22 08:10

James