|
@@ -16,6 +16,20 @@ import java.io.File
|
|
* @date 2018/1/24
|
|
* @date 2018/1/24
|
|
* @url https://noahlan.me
|
|
* @url https://noahlan.me
|
|
*/
|
|
*/
|
|
|
|
+fun main(args: Array<String>) {
|
|
|
|
+ generate(true, "NorthLan", "sys", DataSourceConfig().also {
|
|
|
|
+ it.dbType = DbType.MYSQL
|
|
|
|
+ it.typeConvert = object : MySqlTypeConvert() {
|
|
|
|
+ override fun processTypeConvert(fieldType: String?): DbColumnType {
|
|
|
|
+ return super.processTypeConvert(fieldType)
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ it.driverName = "com.mysql.jdbc.Driver"
|
|
|
|
+ it.username = "archives"
|
|
|
|
+ it.password = "archives"
|
|
|
|
+ it.url = "jdbc:mysql://192.168.1.124:3307/archives_sys?characterEncoding=utf8"
|
|
|
|
+ })
|
|
|
|
+}
|
|
|
|
|
|
fun generate(isKotlin: Boolean, author: String, pkgType: String, dataSourceConfig: DataSourceConfig) {
|
|
fun generate(isKotlin: Boolean, author: String, pkgType: String, dataSourceConfig: DataSourceConfig) {
|
|
val mpg = AutoGenerator()
|
|
val mpg = AutoGenerator()
|
|
@@ -94,18 +108,4 @@ fun generate(isKotlin: Boolean, author: String, pkgType: String, dataSourceConfi
|
|
mpg.execute()
|
|
mpg.execute()
|
|
}
|
|
}
|
|
|
|
|
|
-fun main(args: Array<String>) {
|
|
|
|
- generate(false, "NorthLan", "bus", DataSourceConfig().also {
|
|
|
|
- it.dbType = DbType.MYSQL
|
|
|
|
- it.typeConvert = object : MySqlTypeConvert() {
|
|
|
|
- override fun processTypeConvert(fieldType: String?): DbColumnType {
|
|
|
|
|
|
|
|
- return super.processTypeConvert(fieldType)
|
|
|
|
- }
|
|
|
|
- }
|
|
|
|
- it.driverName = "com.mysql.jdbc.Driver"
|
|
|
|
- it.username = "root"
|
|
|
|
- it.password = "root"
|
|
|
|
- it.url = "jdbc:mysql://127.0.0.1:3306/archives_rec?characterEncoding=utf8"
|
|
|
|
- })
|
|
|
|
-}
|
|
|