|
@@ -19,7 +19,7 @@
|
|
|
//public class MybatisGeneratorUtils {
|
|
|
// public static void main(String[] args) {
|
|
|
// //修改成自己的模块名称
|
|
|
-// String[] models = {"mhfire-controller", "mhfire-service", "mhfire-model", "mhfire-persistence"};
|
|
|
+// String[] models = {"test-controller", "test-service", "test-model", "test-persistence"};
|
|
|
// for (String model : models) {
|
|
|
// shell(model);
|
|
|
// }
|
|
@@ -44,10 +44,10 @@
|
|
|
// //2、数据源配置
|
|
|
// //修改数据源
|
|
|
// DataSourceConfig dsc = new DataSourceConfig();
|
|
|
-// dsc.setUrl("jdbc:mysql://101.133.214.75:3306/mhfire?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=Asia/Shanghai&characterEncoding=utf8&allowMultiQueries=true");
|
|
|
+// dsc.setUrl("jdbc:mysql://32.0.15.67:13306/mhdsj_xfdata?useUnicode=true&useJDBCCompliantTimezoneShift=true&useLegacyDatetimeCode=false&serverTimezone=UTC&characterEncoding=utf8");
|
|
|
// dsc.setDriverName("com.mysql.jdbc.Driver");
|
|
|
-// dsc.setUsername("root");
|
|
|
-// dsc.setPassword("123456");
|
|
|
+// dsc.setUsername("mysql");
|
|
|
+// dsc.setPassword("1qaz@WSX#mysql");
|
|
|
// mpg.setDataSource(dsc);
|
|
|
//
|
|
|
// // 3、包配置
|
|
@@ -71,13 +71,13 @@
|
|
|
// // strategy.setTablePrefix("t_"); // 表名前缀
|
|
|
// strategy.setEntityLombokModel(true); //使用lombok
|
|
|
// //修改自己想要生成的表
|
|
|
-// strategy.setInclude("duty"); // 逆向工程使用的表 如果要生成多个,这里可以传入String[]
|
|
|
+// strategy.setInclude("water_aj"); // 逆向工程使用的表 如果要生成多个,这里可以传入String[]
|
|
|
// mpg.setStrategy(strategy);
|
|
|
//
|
|
|
// // 关闭默认 xml 生成,调整生成 至 根目录
|
|
|
// //修改对应的模块名称
|
|
|
// TemplateConfig tc = new TemplateConfig();
|
|
|
-// if ("mhfire-persistence".equals(model)) {
|
|
|
+// if ("test-persistence".equals(model)) {
|
|
|
// tc.setController(null);
|
|
|
// tc.setEntity(null);
|
|
|
// tc.setService(null);
|
|
@@ -105,18 +105,18 @@
|
|
|
// cfg.setFileOutConfigList(focList);
|
|
|
// mpg.setCfg(cfg);
|
|
|
// tc.setXml(null);
|
|
|
-// } else if ("mhfire-model".equals(model)) {
|
|
|
+// } else if ("test-model".equals(model)) {
|
|
|
// tc.setController(null);
|
|
|
// tc.setService(null);
|
|
|
// tc.setServiceImpl(null);
|
|
|
// tc.setMapper(null);
|
|
|
// tc.setXml(null);
|
|
|
-// } else if ("mhfire-service".equals(model)) {
|
|
|
+// } else if ("test-service".equals(model)) {
|
|
|
// tc.setController(null);
|
|
|
// tc.setMapper(null);
|
|
|
// tc.setXml(null);
|
|
|
// tc.setEntity(null);
|
|
|
-// } else if ("mhfire-controller".equals(model)) {
|
|
|
+// } else if ("test-controller".equals(model)) {
|
|
|
// tc.setMapper(null);
|
|
|
// tc.setXml(null);
|
|
|
// tc.setService(null);
|