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.