Source: Internet
There are always children asking how the process diagram is drawn, what tools are used to make the UML class diagram and so on. Today I recommend an IDEA plug-in PlantUml to help you complete the drawing quickly and quickly.
What is PlantUml
PlantUml is an open source project that supports fast drawing. It defines a complete set of language for the description of UML diagrams, and generates UML diagrams based on the powerful Graphviz rendering library. Drawn UML diagrams can also be exported as images, as well as generic vector SVG format files.
The advantages of PlantUML
- Complete text editing, no control drag, automatic adjustment of pixel distance, simple and beautiful
- Completely platform-independent and platform-independent, UML diagrams can be generated with the PlantUML JAR package
- Support multiple text editors, ide integration, such as idea, eclipse, notepad++ and so on
As a Java coder, YOU usually use IDEA as your preferred development tool, and we’ll focus on the use of IDEA
Idea Install PlantUML plug-in
File -> Settings -> Plugins search for PlantUML, find PlantUML Integration and install
Install Graphviz on your computer
Download address
Graphviz. Gitlab. IO / \ _pages/Dow…
Configuring environment Variables
Add a variable named GRAPHVIZ_HOME and the value of the variable is installation Path D:\WorkWare\Graphviz2.38. Add %GRAPHVIZ_HOME%\bin in the Path directory and use “; “between configurations. Configure GRAPHVIZ_DOT separately with variable value %GRAPHVIZ_HOME%\bin\dot.exe
Out of nowhere, a drawing tool 10 times faster than Visio arrived.
Open the Windows CLI and run the dot-version command. If the following page is displayed, the configuration is normal
The idea of configuration graphviz
File -> Settings -> Other Settings -> PlantUML
Use plantUML to draw flow charts
Creating a UML File
Enter test text
@startuml
Alice -> Bob: Authentication Request
Bob --> Alice: Authentication Response
Alice -> Bob: Another authentication Request
Alice <-- Bob: another authentication Response
@enduml
Copy the code
To the right is a real-time reality flow chart
You can also create a UML class diagram based on the classes you write. You can also follow the approach we recommended the day before: an underrated feature in IDEA that draws project code into UML class diagrams with one click
other
If you don’t want to install Graphviz and want to use it directly, you can download the Chrome plugin PlantUML Viewer. After installing it, you can edit the text directly and display it directly in the browser.
Recommend 2 original Springboot +Vue projects, with complete video explanation and documentation and source code:
【VueAdmin】 hand to hand teach you to develop SpringBoot+Jwt+Vue back-end separation management system
- Full 800 – minute video tutorial: www.bilibili.com/video/BV1af…
- Complete development document front end: www.zhuawaba.com/post/18
- Full development documentation backend: www.zhuawaba.com/post/19
【VueBlog】 Based on SpringBoot+Vue development of the front and back end separation blog project complete teaching
- Full 200 – minute video tutorial: www.bilibili.com/video/BV1af…
- Full development documentation: www.zhuawaba.com/post/17
If you have any questions, please come to my official account [Java Q&A Society] and ask me