JFinal2.0 start other plugins after opening the server

Source: Internet
Author: User

Recently colleagues in the jfinal dynamic Add data source configuration, thanks to the emergence of JFinal2.0, it is very convenient to solve the problem.

When I look at his code, I inadvertently find that the plug-in also needs to call the start () method, so I think about how to start after configuring the plug-in in the general configuration class. So I looked for an afternoon and finally found it. Thank the Lone Star can be the great god to share the jfinal source 1--jfinal initialization (address: http://my.oschina.net/u/1385515/blog/388831). Some of them are drawn from here.

In the source code of ActiveRecord there is a start () method, select the method name, right-click, Open call Hierarchy, you can see the result of this method is called

You can see that the Config class is called first, called by the Jfinal class, and finally started by Jfinalfilter. The Jfinalfilter is initiated by the Web container because it integrates the Init method (Java Web Foundation) that starts when the Javax.servlet.filter,web container starts ... )。 Finally, there are two ways to start the jfinal container, one is to manually turn on Tomcat and the other is the main method of the general configuration file. Others do not say more, we can explore their own.

JFinal2.0 start other plugins after opening the server

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.