Commit e686bc63 authored by hewei's avatar hewei

提示信息级别区分

parent e7241f3c
...@@ -54,14 +54,14 @@ public class BatchInsertPlugin extends BasePlugin { ...@@ -54,14 +54,14 @@ public class BatchInsertPlugin extends BasePlugin {
if ("com.mysql.jdbc.Driver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false if ("com.mysql.jdbc.Driver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false
&& "com.microsoft.jdbc.sqlserver.SQLServer".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false && "com.microsoft.jdbc.sqlserver.SQLServer".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false
&& "com.microsoft.sqlserver.jdbc.SQLServerDriver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false){ && "com.microsoft.sqlserver.jdbc.SQLServerDriver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false){
logger.warn("itfsw:插件" + this.getClass().getTypeName() + "插件使用前提是数据库为MySQL或者SQLserver,因为返回主键使用了JDBC的getGenereatedKeys方法获取主键!"); logger.error("itfsw:插件" + this.getClass().getTypeName() + "插件使用前提是数据库为MySQL或者SQLserver,因为返回主键使用了JDBC的getGenereatedKeys方法获取主键!");
return false; return false;
} }
// 插件使用前提是使用了ModelColumnPlugin插件 // 插件使用前提是使用了ModelColumnPlugin插件
if (!PluginTools.checkDependencyPlugin(ModelColumnPlugin.class, getContext())) { if (!PluginTools.checkDependencyPlugin(ModelColumnPlugin.class, getContext())) {
logger.warn("itfsw:插件" + this.getClass().getTypeName() + "插件需配合com.itfsw.mybatis.generator.plugins.ModelColumnPlugin插件使用!"); logger.error("itfsw:插件" + this.getClass().getTypeName() + "插件需配合com.itfsw.mybatis.generator.plugins.ModelColumnPlugin插件使用!");
return false; return false;
} }
......
...@@ -47,7 +47,7 @@ public class ExampleTargetPlugin extends BasePlugin { ...@@ -47,7 +47,7 @@ public class ExampleTargetPlugin extends BasePlugin {
Properties properties = getProperties(); Properties properties = getProperties();
this.targetPackage = properties.getProperty(TARGET_PACKAGE_KEY); this.targetPackage = properties.getProperty(TARGET_PACKAGE_KEY);
if (this.targetPackage == null){ if (this.targetPackage == null){
logger.warn("请配置com.itfsw.mybatis.generator.plugins.ExampleTargetPlugin插件的目标包名(targetPackage)!"); logger.error("请配置com.itfsw.mybatis.generator.plugins.ExampleTargetPlugin插件的目标包名(targetPackage)!");
return false; return false;
} }
return super.validate(warnings); return super.validate(warnings);
......
...@@ -42,7 +42,7 @@ public class LimitPlugin extends BasePlugin { ...@@ -42,7 +42,7 @@ public class LimitPlugin extends BasePlugin {
public boolean validate(List<String> warnings) { public boolean validate(List<String> warnings) {
// 该插件只支持MYSQL // 该插件只支持MYSQL
if ("com.mysql.jdbc.Driver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false){ if ("com.mysql.jdbc.Driver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false){
logger.warn("itfsw:插件"+this.getClass().getTypeName()+"只支持MySQL数据库!"); logger.error("itfsw:插件"+this.getClass().getTypeName()+"只支持MySQL数据库!");
return false; return false;
} }
return super.validate(warnings); return super.validate(warnings);
......
...@@ -44,7 +44,7 @@ public class TablePrefixPlugin extends BasePlugin { ...@@ -44,7 +44,7 @@ public class TablePrefixPlugin extends BasePlugin {
// 如果table配置了domainObjectName或者mapperName就不要再启动该插件了 // 如果table配置了domainObjectName或者mapperName就不要再启动该插件了
for (TableConfiguration tableConfiguration : context.getTableConfigurations()) { for (TableConfiguration tableConfiguration : context.getTableConfigurations()) {
if (tableConfiguration.getDomainObjectName() != null || tableConfiguration.getMapperName() != null) { if (tableConfiguration.getDomainObjectName() != null || tableConfiguration.getMapperName() != null) {
logger.warn("itfsw:插件" + this.getClass().getTypeName() + "插件请不要配合table的domainObjectName或者mapperName一起使用!"); logger.error("itfsw:插件" + this.getClass().getTypeName() + "插件请不要配合table的domainObjectName或者mapperName一起使用!");
return false; return false;
} }
} }
......
...@@ -48,14 +48,14 @@ public class TableRenamePlugin extends BasePlugin { ...@@ -48,14 +48,14 @@ public class TableRenamePlugin extends BasePlugin {
// 如果配置了searchString 或者 replaceString,二者不允许单独存在 // 如果配置了searchString 或者 replaceString,二者不允许单独存在
if ((getProperties().getProperty(PRE_SEARCH_STRING) == null && getProperties().getProperty(PRE_REPLACE_STRING) != null) if ((getProperties().getProperty(PRE_SEARCH_STRING) == null && getProperties().getProperty(PRE_REPLACE_STRING) != null)
|| (getProperties().getProperty(PRE_SEARCH_STRING) != null && getProperties().getProperty(PRE_REPLACE_STRING) == null)) { || (getProperties().getProperty(PRE_SEARCH_STRING) != null && getProperties().getProperty(PRE_REPLACE_STRING) == null)) {
logger.warn("itfsw:插件" + this.getClass().getTypeName() + "插件的searchString、replaceString属性需配合使用,不能单独存在!"); logger.error("itfsw:插件" + this.getClass().getTypeName() + "插件的searchString、replaceString属性需配合使用,不能单独存在!");
return false; return false;
} }
// 如果table配置了domainObjectName或者mapperName就不要再启动该插件了 // 如果table配置了domainObjectName或者mapperName就不要再启动该插件了
for (TableConfiguration tableConfiguration: context.getTableConfigurations()) { for (TableConfiguration tableConfiguration: context.getTableConfigurations()) {
if (tableConfiguration.getDomainObjectName() != null || tableConfiguration.getMapperName() != null){ if (tableConfiguration.getDomainObjectName() != null || tableConfiguration.getMapperName() != null){
logger.warn("itfsw:插件" + this.getClass().getTypeName() + "插件请不要配合table的domainObjectName或者mapperName一起使用!"); logger.error("itfsw:插件" + this.getClass().getTypeName() + "插件请不要配合table的domainObjectName或者mapperName一起使用!");
return false; return false;
} }
} }
......
...@@ -62,7 +62,7 @@ public class UpsertPlugin extends BasePlugin { ...@@ -62,7 +62,7 @@ public class UpsertPlugin extends BasePlugin {
// 插件使用前提是数据库为MySQL // 插件使用前提是数据库为MySQL
if ("com.mysql.jdbc.Driver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false){ if ("com.mysql.jdbc.Driver".equalsIgnoreCase(this.getContext().getJdbcConnectionConfiguration().getDriverClass()) == false){
logger.warn("itfsw:插件" + this.getClass().getTypeName() + "插件使用前提是数据库为MySQL!"); logger.error("itfsw:插件" + this.getClass().getTypeName() + "插件使用前提是数据库为MySQL!");
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment