Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 37 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
<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>org.tinystruct</groupId>
<artifactId>tinystruct</artifactId>
<version>2.0.0-SNAPSHOT</version>
<dependencies>
<dependency>
<groupId>org.tinystruct</groupId>
<artifactId>tinystruct2.0</artifactId>
<version>1.0.0</version>
<scope>system</scope>
<systemPath>${basedir}/WEB-INF/lib/struct-2.0.jar</systemPath>
</dependency>
<!-- https://mvnrepository.com/artifact/javax.servlet/javax.servlet-api -->
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>3.0.1</version>
<scope>provided</scope>
</dependency>
</dependencies>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
</properties>
<build>
<sourceDirectory>${basedir}/src/main/java</sourceDirectory>
<outputDirectory>${basedir}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
import org.tinystruct.ApplicationException;
import org.tinystruct.data.tools.Generator;
import org.tinystruct.data.tools.MySQLGenerator;
public class ApplicationGenerator {
public static void main(String[]arguments)
{
System.out.println("Please type the command like this:ApplicationGenerator className tableName");
try {
String[] list=new String[]{"book"};
// String[] list=new String[]{"Member","User","Rights","Role"};
for(String className:list)
{
Generator generator=new MySQLGenerator();
generator.setFileName("src/custom/objects/");
generator.setPackageName("custom.objects");
generator.importPackages("java.util.Date");
generator.create(className,className);
System.out.println("class:"+className+" table:"+className);
}
} catch (ApplicationException e) {
e.printStackTrace();
}
System.out.println("OK!");
System.out.close();
}

import org.tinystruct.ApplicationException;
import org.tinystruct.data.tools.Generator;
import org.tinystruct.data.tools.MySQLGenerator;

public class ApplicationGenerator {
public static void main(String[]arguments)
{
System.out.println("Please type the command like this:ApplicationGenerator className tableName");

try {
String[] list=new String[]{"book"};
// String[] list=new String[]{"Member","User","Rights","Role"};
for(String className:list)
{
Generator generator=new MySQLGenerator();
generator.setFileName("src/custom/objects/");
generator.setPackageName("custom.objects");
generator.importPackages("java.util.Date");
generator.create(className,className);
System.out.println("class:"+className+" table:"+className);
}
} catch (ApplicationException e) {
e.printStackTrace();
}

System.out.println("OK!");
System.out.close();
}
}
File renamed without changes.
Loading