Skip to content

仓库 files navigation

SQLSchema2Java Open Source Love svg1

Coverage Status CodeQL main

Maven Central Maven Central

Logo SQL2JAVA  and website adress sassine.dev/sqlschema2java

sqlschema2java generates Java types from SQLSchema and annotate those types for data-binding with Jackson 2.x, Javax Persistence and Spring 仓库.

File SQL -> Funil -> Generate Files DTO, Entity and Repostiory.java

You can use sqlschema2java as a Maven plugin. Try at the sample project exemple

Read Getting Started

Implementation

A very simple Maven example:

pom.xml
 <plugins>
            <plugin>
                <groupId>dev.sassine.api</groupId>
                <artifactId>sqlschema2java-maven-plugin</artifactId>
                <version>1.0.0-beta</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>generate</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <sourceDirectory>./example.sql</sourceDirectory>
                    <packageName>dev.sassine.api</packageName>
                    <useAutoIncrement>true</useAutoIncrement>
                    <usePostgreSQL>false</usePostgreSQL>
                </configuration>
            </plugin>
</plugins>

Parameters

Name required type description
sourceDirectory true String SQL file path
packageName true String package name with points that will be generated
useAutoIncrement false Boolean disable or enable whether the primary key will have its value generated automatically
usePostgreSQL true Boolean disable or enable query conversion compatible with postgres database
Run command
mvn dev.sassine.api:sqlschema2java-maven-plugin:generate

Successful ✨

Contributing

拉取请求 are welcome. For major changes, please open an issue first to discuss what you would like to change.

Please make sure to update tests as appropriate.

ko-fi

License

GitHub license

关于

sqlschema2java generates Java types from SQLSchema and annotate those types for data-binding with Jackson 2.x, Javax Persistence and Spring 仓库.

Topics

Resources

Stars

3 stars

关注者

1 watching

复刻s

发布

Sponsor this project

Used by

贡献者

Languages