Use scaffolding to create a single module project and a scaffold Module Project

Source: Internet
Author: User

Use scaffolding to create a single module project and a scaffold Module Project
Use scaffolding to create a single module project learn how to use scaffolding to create a single module project.

This guide will guide you through creating a Leopard-based Single-module project. You can learn about the code division of Model, DAO, Service, and Controller, how to Use Jetty for local testing and unit testing.

How to complete this guide

You can start from scratch and complete each step, or you can bypass the basic setup steps you are already familiar. Either way, you can finally get the code that can work.

1. Use commands to generate project code

Generate a single-module project where groupId is com. baidu. example, artifactId is example, and version is 0.0.1-SNAPSHOT.

You can use

mvn io.leopard.maven.plugins:leopard-maven-plugin:0.0.1:sexample -DgroupId=com.baidu.example

You can also use

mvn io.leopard.maven.plugins:leopard-maven-plugin:0.0.1:sexample -DgroupId=com.baidu.example -DartifactId=example

You can also use

mvn io.leopard.maven.plugins:leopard-maven-plugin:0.0.1:sexample -DgroupId=com.baidu.example -DartifactId=example -Dversion=0.0.1-SNAPSHOT
2. Import Eclipse

File menu-> Import... -> Open the Import window-> Maven-> select Existing Maven Projects-> Next-> open the Import Maven Projects window.

In the Import Maven Projects window, select the generated source code Directory-> Click Finish to Import the project.

3. Run

Opensrc/test/java/com/baidu/example/JettyTest.javaRight-click Run As> Java Application and start Jetty test.

4. access through a browser

Http: // localhost/index. do

Summary

Congratulations! You have created a Leopard-based Single-module project. Although the function is simple, you can expand your business system on this basis. Good luck.

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.