feat(app): add application entry point and execution plugin
This commit is contained in:
@@ -108,6 +108,16 @@
|
|||||||
<artifactId>maven-project-info-reports-plugin</artifactId>
|
<artifactId>maven-project-info-reports-plugin</artifactId>
|
||||||
<version>3.6.1</version>
|
<version>3.6.1</version>
|
||||||
</plugin>
|
</plugin>
|
||||||
|
|
||||||
|
<plugin>
|
||||||
|
<groupId>org.codehaus.mojo</groupId>
|
||||||
|
<artifactId>exec-maven-plugin</artifactId>
|
||||||
|
<version>3.5.0</version>
|
||||||
|
<configuration>
|
||||||
|
<mainClass>com.example.Main</mainClass>
|
||||||
|
</configuration>
|
||||||
|
</plugin>
|
||||||
|
|
||||||
</plugins>
|
</plugins>
|
||||||
</pluginManagement>
|
</pluginManagement>
|
||||||
</build>
|
</build>
|
||||||
|
|||||||
@@ -0,0 +1,17 @@
|
|||||||
|
package com.example;
|
||||||
|
|
||||||
|
public class Main {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
UserDao userDao = new UserDao();
|
||||||
|
|
||||||
|
User user = new User();
|
||||||
|
user.setName("User");
|
||||||
|
user.setEmail("user@example.com");
|
||||||
|
user.setAge(99);
|
||||||
|
|
||||||
|
userDao.create(user);
|
||||||
|
|
||||||
|
System.out.println(user);
|
||||||
|
}
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user