1、API升级

Former-commit-id: f65c5ce0784c6cc6d465d84731adc99aa2bcc665
master
wangbing 5 years ago
parent cf42b08ad0
commit c99a234707

@ -90,7 +90,7 @@ public class ApiCallable implements Callable {
HashMap<String, Object> ctx = new HashMap<String, Object>();
ctx.put("api", api.getName());
File file = new File(api, "pom.xml");
freeMarkerManager.outputTemp(file, "Java_api/pom.ftl", ctx);
freeMarkerManager.outputTemp(file, "Java_api/pom.xml", ctx);
}

@ -106,27 +106,27 @@ public class SpringBootCallable implements Callable {
//module
{
{
Module module = new Module();
File api = new File(moduleDir.getAbsolutePath(), "api");
api.mkdirs();
module.setModuleName("api");
module.setProjectAuthor(project.getProjectAuthor());
module.setProjectBasePackage(project.getProjectBasePackage());
module.setProjectName(project.getProjectName());
System.out.println("生成模块:Entity");
generateEntity(new File(api.getAbsolutePath(), "ent"), module, dataBase, option);
System.out.println("生成模块:Mapper");
generateMapper(new File(api.getAbsolutePath(), "mpr"), module, dataBase, option);
System.out.println("生成模块:Manager");
generateManager(new File(api.getAbsolutePath(), "mgr"), module, dataBase, option);
System.out.println("生成模块:Requset");
generateRequset(new File(api.getAbsolutePath(), "req"), module, dataBase, option);
System.out.println("生成模块:Response");
generateResponse(new File(api.getAbsolutePath(), "rsp"), module, dataBase, option);
}
// {
//
// Module module = new Module();
// File api = new File(moduleDir.getAbsolutePath(), "api");
// api.mkdirs();
// module.setModuleName("api");
// module.setProjectAuthor(project.getProjectAuthor());
// module.setProjectBasePackage(project.getProjectBasePackage());
// module.setProjectName(project.getProjectName());
//
// System.out.println("生成模块:Entity");
// generateEntity(new File(api.getAbsolutePath(), "ent"), module, dataBase, option);
// System.out.println("生成模块:Mapper");
// generateMapper(new File(api.getAbsolutePath(), "mpr"), module, dataBase, option);
// System.out.println("生成模块:Manager");
// generateManager(new File(api.getAbsolutePath(), "mgr"), module, dataBase, option);
// System.out.println("生成模块:Requset");
// generateRequset(new File(api.getAbsolutePath(), "req"), module, dataBase, option);
// System.out.println("生成模块:Response");
// generateResponse(new File(api.getAbsolutePath(), "rsp"), module, dataBase, option);
// }
for (Module module : project.getModules()) {
module.setProjectAuthor(project.getProjectAuthor());
module.setProjectBasePackage(project.getProjectBasePackage());

@ -1,100 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.wb</groupId>
<artifactId>${api}</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<properties>
<maven.test.skip>true</maven.test.skip>
</properties>
<dependencies>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.9.6</version>
</dependency>
<dependency>
<groupId>com.squareup.okhttp3</groupId>
<artifactId>okhttp</artifactId>
<version>3.4.1</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
</dependency>
<#--<!-- &ndash;&gt;-->
<#--<dependency>-->
<#--<groupId>org.hibernate.validator</groupId>-->
<#--<artifactId>hibernate-validator</artifactId>-->
<#--<version>6.0.10.Final</version>-->
<#--</dependency>-->
<#--<dependency>-->
<#--<groupId>org.glassfish</groupId>-->
<#--<artifactId>javax.el</artifactId>-->
<#--<version>3.0.0</version>-->
<#--</dependency>-->
</dependencies>
<build>
<!-- -->
<finalName>${r"${artifactId}"}-${r"${version}"}</finalName>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.8</source>
<target>1.8</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>2.7</version>
<executions>
<execution>
<id>copy-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>copy-dependencies</goal>
</goals>
<configuration>
<!-- ${r"${project.build.directory}"}Maventarget -->
<outputDirectory>${r"${project.build.directory}"}/lib</outputDirectory>
<!-- -->
<excludeTransitive>false</excludeTransitive>
<!-- jar -->
<stripVersion>false</stripVersion>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>2.4</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
<classpathPrefix>lib/</classpathPrefix>
<mainClass>com.example.ApiClient</mainClass>
</manifest>
</archive>
</configuration>
</plugin>
</plugins>
</build>
</project>
Loading…
Cancel
Save

Powered by TurnKey Linux.