-
Notifications
You must be signed in to change notification settings - Fork 173
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
39 changed files
with
2,058 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
{ | ||
"codeConfig": { | ||
"type": "cn.enilu.sbvue.code.CodeConfig", | ||
"type": "cn.enilu.flash.code.CodeConfig", | ||
"fields": { | ||
entityModel: "guns-entity", | ||
daoModel: "guns-dao1", | ||
serviceModel: "guns-service2", | ||
controllerModel: "guns-api", | ||
viewModel: "guns-admin-vuejs" | ||
daoModel: "guns-dao", | ||
serviceModel: "guns-service", | ||
controllerModel: "guns-admin", | ||
viewModel: "guns-admin" | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
<?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"> | ||
<parent> | ||
<artifactId>guns-lite</artifactId> | ||
<groupId>cn.enilu</groupId> | ||
<version>1.0</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>guns-generator</artifactId> | ||
<properties> | ||
<java-version>1.8</java-version> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<evo-inflector-version>1.0.1</evo-inflector-version> | ||
<velocity-version>1.7</velocity-version> | ||
<commons-cli-version>1.2</commons-cli-version> | ||
<spring.boot.version>2.1.1.RELEASE</spring.boot.version> | ||
</properties> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-starter-data-jpa</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.atteo</groupId> | ||
<artifactId>evo-inflector</artifactId> | ||
<version>${evo-inflector-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-cli</groupId> | ||
<artifactId>commons-cli</artifactId> | ||
<version>${commons-cli-version}</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.velocity</groupId> | ||
<artifactId>velocity</artifactId> | ||
<version>${velocity-version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.nutz</groupId> | ||
<artifactId>nutz</artifactId> | ||
</dependency> | ||
</dependencies> | ||
|
||
</project> |
21 changes: 21 additions & 0 deletions
21
guns-generator/src/main/java/cn/enilu/flash/code/AbstractLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package cn.enilu.flash.code; | ||
|
||
import org.nutz.ioc.Ioc; | ||
|
||
import java.util.Map; | ||
|
||
/** | ||
* 基础的数据结构加载器<br> | ||
* @author : zhangtao <br> | ||
* 创建日期: 16-7-12<br> | ||
*/ | ||
public abstract class AbstractLoader { | ||
|
||
public abstract Map<String, TableDescriptor> loadTables(Ioc ioc, | ||
String basePackageName, String baseUri, | ||
String servPackageName, | ||
String repositoryPackageName, | ||
String modPackageName) throws Exception; | ||
|
||
|
||
} |
63 changes: 63 additions & 0 deletions
63
guns-generator/src/main/java/cn/enilu/flash/code/CodeConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
package cn.enilu.flash.code; | ||
|
||
public class CodeConfig { | ||
private String entityModel = "guns-entity"; | ||
private String daoModel = "guns-dao"; | ||
private String serviceModel = "guns-service"; | ||
private String controllerModel = "guns-api"; | ||
private String viewModel = "guns-admin-vuejs"; | ||
public String getModel(String type){ | ||
switch (type){ | ||
case "model": | ||
return entityModel; | ||
case "repository": | ||
return daoModel; | ||
case "service": | ||
return serviceModel; | ||
case "controller": | ||
return controllerModel; | ||
case "view": | ||
return viewModel; | ||
} | ||
return null; | ||
} | ||
public String getEntityModel() { | ||
return entityModel; | ||
} | ||
|
||
public void setEntityModel(String entityModel) { | ||
this.entityModel = entityModel; | ||
} | ||
|
||
public String getDaoModel() { | ||
return daoModel; | ||
} | ||
|
||
public void setDaoModel(String daoModel) { | ||
this.daoModel = daoModel; | ||
} | ||
|
||
public String getServiceModel() { | ||
return serviceModel; | ||
} | ||
|
||
public void setServiceModel(String serviceModel) { | ||
this.serviceModel = serviceModel; | ||
} | ||
|
||
public String getControllerModel() { | ||
return controllerModel; | ||
} | ||
|
||
public void setControllerModel(String controllerModel) { | ||
this.controllerModel = controllerModel; | ||
} | ||
|
||
public String getViewModel() { | ||
return viewModel; | ||
} | ||
|
||
public void setViewModel(String viewModel) { | ||
this.viewModel = viewModel; | ||
} | ||
} |
Oops, something went wrong.