God-class Java programmer to teach you basic development, the simplest Micro Java web framework

Source: Internet
Author: User
Tags java web

Introduced:

It is an open source (Apache License) mini-web framework in Java with minimal dependencies and a fast learning curve.

The goal of the project is to create an easy-to-use and cracked mini-web framework in Java.

    1. Get the project source code, project explanation, knowledge sharing, learning communication, then join the small series of Java Learning Exchange Group it!

    1. 616 959 444

The code is as follows:

Route method

First, we have to create an application and add some routes:



Where to contact is a simple pojo:

The second step is to choose your favorite server, template engine and content type engine.

For example, I will select

Jetty as a template engine for server Freemarker, Jackson as a JSON engine and jaxbxml engine. My maven pom.xml looks like this:

The final step is to start Pippo with your application as a parameter:

Pippo starts the embedded Web server (located in your classpath) and makes the application available for Port 8338 (the default).

Controller method

Define the controller:

To add a controller to your application:

Don't forget this.

    1. Get the project source code, project explanation, knowledge sharing, learning communication, then join the small series of Java Learning Exchange Group it!

    2. 616 959 444

Of course, not to forget this

ControllerThe concept is included in the Pippo-controller module, so you must add this module to your project as a dependency.

God-class Java programmer to teach you basic development, the simplest Micro Java web framework

Related Article

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.