JPress is a java replacement for 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 of WordPress. It is naturally integrated with the WeChat public platform, integrating many domestic cloud platforms, SMS sending, and email sending platforms. The original "template as model" concept is not available in WordPress, and only experienced WordPress Only 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.
In terms of functionality
Supports 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 a website 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).
On WeChat
Support 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.
In terms of technology
Proudly using JFinal as its core, JPress also benefits from JFinal's flexible architecture. In the JFinal framework 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, admin lte, 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 features
1. 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-java-5.1.36.jar, slf4j-api-1.7.7.jar , slf4j-log4j12-1.7.7.jar, jetty-server-8.1.8.jar Of these 14 jar packages, jetty-server-8.1.8.jar is not necessary 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 agreement, which is not at the same level as domestic "open source" products that use private agreements.
jpress v4.2.0 change log
New: Add background verification code switch to facilitate automated testing in certain scenarios
New: Supports publishing products of 0 yuan. When the payment amount is 0, the direct payment is successful. Thanks to @AlienJunX
New: The function of customizing the plug-in installation directory makes it easier to install the plug-in and the plug-in is still available when compiling and clearing the target directory.
Optimization: Improve the article module and add the collection function, thank you @ the mouse that scares the cat to death
Optimization: Option system configuration allows empty data to be passed in to clear the configuration
Optimization: Adjust the default attachment size for uploading. The default size for pictures is 10MB, and the default size for other files is 100MB.
Optimization: Upgrade Jboot, Log4j2 until this
Fix: The problem that illegal keywords customized in the background are invalid
Fix: Deleting Option through API may not take effect in time
Fix: The plug-in depends on external jars, which may cause the problem of being unable to be installed in some cases.
Fix: 500 error occurs after WeChat H5 payment successfully returns to the page, thanks @AlienJunX
Fix: When an attachment is inserted into an article and an attachment file is too large error occurs, there is no prompt on the page.
Fixed: CKEditor editor image cannot be pasted and uploaded