优化代码注释
This commit is contained in:
@@ -7,7 +7,6 @@ import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
/**
|
||||
* @Description: 插件集成配置
|
||||
* @Author: jishenghua
|
||||
* @Version: 1.0
|
||||
* @Create Date Time: 2019-05-30 15:53
|
||||
@@ -16,18 +15,10 @@ import org.springframework.context.annotation.Configuration;
|
||||
*/
|
||||
@Configuration
|
||||
public class PluginBeanConfig {
|
||||
|
||||
|
||||
/**
|
||||
* 定义插件应用。使用可以注入它操作插件。
|
||||
* @return PluginApplication
|
||||
*/
|
||||
@Bean
|
||||
public PluginApplication pluginApplication(){
|
||||
// 实例化自动初始化插件的PluginApplication
|
||||
PluginApplication pluginApplication = new AutoPluginApplication();
|
||||
pluginApplication.addExtension(new SpringBootMybatisExtension());
|
||||
return pluginApplication;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -27,19 +27,12 @@ public class PluginConfiguration extends DefaultIntegrationConfiguration {
|
||||
@Value("${runMode:dev}")
|
||||
private String runMode;
|
||||
|
||||
/**
|
||||
* 插件的路径
|
||||
*/
|
||||
@Value("${pluginPath:plugins}")
|
||||
private String pluginPath;
|
||||
|
||||
/**
|
||||
* 插件文件的路径
|
||||
*/
|
||||
@Value("${pluginConfigFilePath:pluginConfigs}")
|
||||
private String pluginConfigFilePath;
|
||||
|
||||
|
||||
@Override
|
||||
public RuntimeMode environment() {
|
||||
return RuntimeMode.byName(runMode);
|
||||
@@ -55,38 +48,21 @@ public class PluginConfiguration extends DefaultIntegrationConfiguration {
|
||||
return pluginConfigFilePath;
|
||||
}
|
||||
|
||||
/**
|
||||
* 重写上传插件包的临时存储路径。只适用于生产环境
|
||||
* @return String
|
||||
*/
|
||||
@Override
|
||||
public String uploadTempPath() {
|
||||
return "temp";
|
||||
}
|
||||
|
||||
/**
|
||||
* 重写插件备份路径。只适用于生产环境
|
||||
* @return String
|
||||
*/
|
||||
@Override
|
||||
public String backupPath() {
|
||||
return "backupPlugin";
|
||||
}
|
||||
|
||||
/**
|
||||
* 重写插件RestController请求的路径前缀
|
||||
* @return String
|
||||
*/
|
||||
@Override
|
||||
public String pluginRestControllerPathPrefix() {
|
||||
return "/api/plugin";
|
||||
}
|
||||
|
||||
/**
|
||||
* 重写是否启用插件id作为RestController请求的路径前缀。
|
||||
* 启动则插件id会作为二级路径前缀。即: /api/plugin/pluginId/**
|
||||
* @return String
|
||||
*/
|
||||
@Override
|
||||
public boolean enablePluginIdRestControllerPathPrefix() {
|
||||
return true;
|
||||
|
||||
@@ -104,7 +104,6 @@ public class TenantConfig {
|
||||
return scannerConfigurer;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 性能分析拦截器,不建议生产使用
|
||||
*/
|
||||
|
||||
@@ -6,10 +6,8 @@ import org.springframework.beans.factory.annotation.Value;
|
||||
import org.springframework.boot.web.server.WebServerFactoryCustomizer;
|
||||
import org.springframework.boot.web.servlet.server.ConfigurableServletWebServerFactory;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.io.File;
|
||||
|
||||
//@Configuration
|
||||
public class WebConfig {
|
||||
private static final Logger logger = LoggerFactory.getLogger(WebConfig.class);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user