A framework for developing WEB UI through Javabean
Whether the following scenarios will appear in your work:
What I mentioned above is the confusion I often encounter. In the current trend of separation of front and back ends, Java has almost given up its investment in Web UI frameworks. Even as Java developers, we rarely use Java UI frameworks such as Struts and JSF to develop, and JSP is rarely written. But in a Javaer daily life, even if one hundred people are unwilling to do so, they will still encounter the demand for UI, but when opening a search engine, they are full of new technologies emerging one after another. Perhaps it is difficult for even those who are in it to explain what is the popular web framework at present.
Speaking of front-end separation, this is also a scenario I often think about. If we simply divide the UI-equipped systems we develop into two categories:
Then the external system is often responsible for professional UI staff or even UI teams, while the internal system is not necessarily the case. At this time, the task of front-end development falls on the back-end engineers.
In this case, the separation of the front and back ends becomes less beautiful, which means:
Finally, after you made up your knowledge, you spent a lot of effort to create the front-end page, and you may still be criticized.
Our internal system often does not require brilliant effects, complex animations, or highly customized structures. It may be just an entrance to back-end services, or manage some configurations, or manage some simple data objects (such as users, orders, products, etc.), or present some common two-dimensional reports. Their most operations are simply CRUDs on data objects. Therefore, I thought about whether I could reversely generate front-end code through Java. Before that, frameworks such as GWT have done this, but the code is too invasive.

git clone https://github.com/magic-bunny/beanuicd beanuimvn installbeanui/vue directory to any directory %your_vue_path%cd %your_vue_path% and npm install<workPath>%your_vue_path%</workPath> in the beanui-maven-plugin plugin in pom.xmlcd beanui/demo and mvn installjava -jar demo-1.0.jarhttp://localhost:8080 <mode>dev</mode>cd beanui/demomvn installStart building a BeanUI project and need to build a router.yml
Note: router.yml is not required. If not configured, the framework will scan all annotated classes containing
@Componentand convert them. At this time,pathattribute needs to be configured. If not configured, it is/
If you need a simplest BeanUI project, see single-demo
path : /test
component : demo.view.layout.card.CardComponent name : root
children :
- title : home
icon : star
component : demo.view.layout.card.CardComponent path : /login
component : demo.view.LoginComponent
children :
- title : home
icon : star
component : demo.view.layout.card.CardComponent If you need to understand how each control is written in Javabean, please click
Note: Since the Element UI is used (Ele.me), you can almost completely refer to the component description of the Element UI.
To understand the usage of the Maven plug-in, please click
If you need to know how to use the enhancement library, please click
BeanUI is licensed under the MIT license. See LICENSE for further details.