JPress , a java alternative to wordpress, developed using JFinal. Supports almost all functions similar to WordPress, such as templates, plug-ins, etc. At the same time, in terms of templates, JPress puts forward the concept of "template as model", which facilitates template producers to flexibly create business models, removes complicated functions such as widgets, and is more flexible and concise than WordPress in terms of template and plug-in production.
However, JPress is not the Java version of WordPress. It is naturally integrated with the WeChat public platform and integrates many domestic cloud platforms, SMS sending, and email sending platforms. The original "template as model" concept is not available in WordPress, and only experienced Only wordpress players can understand the subtle relationship inside. At the same time, the article synchronization function of WeChat article synchronization, QQ public platform, Toutiao, Yidian and other new media will be added in the future, making it more domestic and localized.
JPress in terms of functionalitySupports custom models, which are defined through templates rather than background functions. At the same time, the model content supports custom categories. For example, the article model supports topics, categories, tags and other categories.
Supports multiple template engines. Freemarker is used by default. Template makers can use other engines such as thymeleaf for rendering. It also supports online editing of templates in the background (currently only the freemarker engine is supported).
Supports multiple database types and can configure different databases (currently only mysql is supported).
Supports multiple editors, free switching between background visual editing and markdown editing, and supports functions such as online image editing and code highlighting by default.
It supports plug-in, and you can complete the development of a plug-in with just a few lines of code. There are already helloworld instances of the plug-in on git.oschina.net and github.
Supports custom URLs and website content URL style customization.
API support facilitates APP or other third parties to call data.
Internationalization support, use JPress to easily create websites in any language.
Minimalist SEO function, you can set SEO separately for each article, each category, and each tag, and support sitemap output.
User registration supports email and SMS verification. Currently, SMS service providers only support Alibaba Dayu.
Supports CDN settings, including Qiniu, Alibaba Cloud, Youpai Cloud, etc.
Uploaded images support watermark settings, and uploaded images are automatically cut into various image sizes required by the template to ensure that the image display will not be stretched.
User login supports third-party login, and supports QQ, WeChat, Weibo, Open Source China, Github, Facebook, Twitter, and LinkedIn (currently only login to QQ, WeChat, Weibo, Open Source China, and Github is completed).
JPress on WeChatSupport WeChat menu settings.
Supports automatic replies, adding keywords and reply content.
Supports default replies, including: when the user pays attention, when entering multi-customer service, when exiting multi-customer service, when sending pictures, when sending voice, when sending video, when sending location, when sending connection, when the user scans the QR code with parameters , when the user shakes.
All automatic replies or default replies support the "advanced reply" function, such as replying to an article, replying to a URL... Advanced replies are special replies built into JPress, but are fully configurable, and more "advanced replies" will be added in the future Function.
Automatic reply or default reply supports plug-in reply, and calls JPress plug-in to complete the reply.
Supports article search. Replying to keywords will return keyword matching articles.
In the future, practical functions such as article synchronization or WeChat import will be supported.
JPress on the technical sideProudly using JFinal as its core, JPress also benefits from JFinal's flexible architecture. In the JFinalframework open source system, JPress cares about the implementation of each line of logic and pays attention to the quality of each line of code. It should be among the best practices of JFinal, so it should also be a must-read item for every JFinaler.
Use Freemarker and thymeleaf as template engines. The unique cache built into JPress makes the UI rendering speed independent of the template engine.
Tinymce is used as the visual editor and simplemde is used as the markdown editor. The two can be switched freely in the background.
The UI plug-in for file and image upload uses fine-uploader.
On the front end, JPress uses jquery, bootstrap, adminlte, font-awesome, x-editable, fastclick, toastr, tag-editor, pace, layer, etc.
In terms of security, although I personally have made a lot of efforts and have done a lot of work in XSS, CSRF, SQL injection, Cookie security, etc., more people are still needed to dig and improve together. Security is an eternity. topic. (But for novice friends, these security should be worth learning and understanding, right?)
To support distributed deployment, JPress rewrites HttpSession and uses ehcache to implement the session function. At the same time, the project relies heavily on cookies, so there is no pressure on the distributed architecture.
JPress has the following features1. Light.
It is as light as only 8 data tables, but it can realize almost all functions of wordpress. The dependent jar packages are also extremely light. Currently, there are only cos-26Dec2008.jar, druid-1.0.16.jar, ehcache-2.7.5.jar, fastjson-1.2.7.jar, freemarker-2.3.23.jar, and javax. mail.jar, jfinal-2.2-bin-with-src.jar, jfinal-weixin-1.7-bin-with-src.jar, jsoup-1.8.3.jar, log4j-1.2.17.jar, mysql-connector- 14 jar packages: java-5.1.36.jar, slf4j-api-1.7.7.jar, slf4j-log4j12-1.7.7.jar, jetty-server-8.1.8.jar, among which jetty-server-8.1 .8.jar is not required and is only used to facilitate debugging.
The entire project including the jar package is about 20MB.
2. Fast.
No matter how complex the page is, JPress responds in almost 10 milliseconds. At the same time, JPress supports Alibaba Cloud, Qiniu, Youpaiyun and other CDNs as acceleration, and supports distributed deployment and other functions. Even if it is a server in Hong Kong, it can only be used with "fast" to describe.
3. Flexible.
JPress proposes the concept of "template as model". Template producers can use JPress to build blogs, news systems, forums, Q&A communities, shopping malls... plus its flexible plug-in function, it can be used to build almost any type of website.
4. Domestic.
Because it is made in China, it is more in line with the needs of Chinese people. JPress is naturally integrated with the WeChat public account. JPress has built-in SMS sending function of Alibaba Big Fish, and supports QQ mailbox, 163 mailbox, etc. as mail sending servers. In the future, WeChat template message sending and notification users will be added, and other functions that are more in line with the needs of Chinese people.
The most important thing is
JPress uses the loosest LGPL open source license, which is not on the same level as domestic "open source" products that use private licenses.
jpressv4.0.9 update log:
New: Added the function of uploading videos to article editors
New: Added html2wxml API and its documentation
Optimization: Update articles, products, page APIs and documentation
Optimization: Improve APIs related to products, shopping carts, and coupons
Fix: The article editor title and bolding are invalid.
Fix: After importing JPress into eclipse, the resource path obtained was wrong in some cases.
Repair: Menu.isUrlEquals may be incorrectly determined in the secondary directory
Fix: Mini program users cannot obtain option information when they are not logged in, and the prompt information is incorrect.
Fix: After turning off the verification code, the background login verification code input box is not displayed.
JPress page display