🎨 优化项目模块.

This commit is contained in:
lijiahang
2025-01-07 17:55:22 +08:00
parent 45b3e0746a
commit c0122079c1
760 changed files with 88 additions and 29 deletions

View File

@@ -33,8 +33,6 @@ package org.dromara.visor.framework.common.constant;
*/
public interface AutoConfigureOrderConst {
int FRAMEWORK_COMMON = Integer.MIN_VALUE + 1000;
int FRAMEWORK_WEB = Integer.MIN_VALUE + 1100;
int FRAMEWORK_SECURITY = Integer.MIN_VALUE + 1200;
@@ -61,7 +59,9 @@ public interface AutoConfigureOrderConst {
int FRAMEWORK_JOB = Integer.MIN_VALUE + 2100;
int FRAMEWORK_JOB_QUARTZ = Integer.MIN_VALUE + 2150;
int FRAMEWORK_JOB_QUARTZ = Integer.MIN_VALUE + 2130;
int FRAMEWORK_JOB_ASYNC = Integer.MIN_VALUE + 2160;
int FRAMEWORK_MONITOR = Integer.MIN_VALUE + 2200;

View File

@@ -1 +0,0 @@
org.dromara.visor.framework.common.configuration.OrionCommonAutoConfiguration

View File

@@ -20,12 +20,11 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.configuration;
package org.dromara.visor.framework.job.configuration;
import cn.orionsec.kit.spring.SpringHolder;
import org.dromara.visor.framework.common.configuration.config.AsyncExecutorConfig;
import org.dromara.visor.framework.common.constant.AutoConfigureOrderConst;
import org.dromara.visor.framework.common.thread.ThreadPoolMdcTaskExecutor;
import org.dromara.visor.framework.job.configuration.config.AsyncExecutorConfig;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.autoconfigure.AutoConfigureOrder;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
@@ -37,7 +36,7 @@ import org.springframework.scheduling.annotation.EnableAsync;
import java.util.concurrent.ThreadPoolExecutor;
/**
* 应用配置类
* async 异步任务
*
* @author Jiahang Li
* @version 1.0.0
@@ -45,17 +44,9 @@ import java.util.concurrent.ThreadPoolExecutor;
*/
@EnableAsync
@AutoConfiguration
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_COMMON)
@AutoConfigureOrder(AutoConfigureOrderConst.FRAMEWORK_JOB_ASYNC)
@EnableConfigurationProperties(AsyncExecutorConfig.class)
public class OrionCommonAutoConfiguration {
/**
* @return spring 容器工具类
*/
@Bean
public SpringHolder.ApplicationContextAwareStore springHolderAware() {
return new SpringHolder.ApplicationContextAwareStore();
}
public class OrionAsyncAutoConfiguration {
/**
* 支持 MDC 的异步线程池

View File

@@ -20,7 +20,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.dromara.visor.framework.common.configuration.config;
package org.dromara.visor.framework.job.configuration.config;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

View File

@@ -2,8 +2,8 @@
"groups": [
{
"name": "orion.async.executor",
"type": "org.dromara.visor.framework.common.configuration.config.AsyncExecutorConfig",
"sourceType": "org.dromara.visor.framework.common.configuration.config.AsyncExecutorConfig"
"type": "org.dromara.visor.framework.job.configuration.config.AsyncExecutorConfig",
"sourceType": "org.dromara.visor.framework.job.configuration.config.AsyncExecutorConfig"
}
],
"properties": [

View File

@@ -1,2 +1,3 @@
org.dromara.visor.framework.job.configuration.OrionSchedulerAutoConfiguration
org.dromara.visor.framework.job.configuration.OrionQuartzAutoConfiguration
org.dromara.visor.framework.job.configuration.OrionQuartzAutoConfiguration
org.dromara.visor.framework.job.configuration.OrionAsyncAutoConfiguration

View File

@@ -24,7 +24,6 @@ package org.dromara.visor.framework.test.core.base;
import com.alibaba.druid.spring.boot.autoconfigure.DruidDataSourceAutoConfigure;
import com.baomidou.mybatisplus.autoconfigure.MybatisPlusAutoConfiguration;
import org.dromara.visor.framework.common.configuration.OrionCommonAutoConfiguration;
import org.dromara.visor.framework.datasource.configuration.OrionDataSourceAutoConfiguration;
import org.dromara.visor.framework.mybatis.configuration.OrionMybatisAutoConfiguration;
import org.dromara.visor.framework.redis.configuration.OrionRedisAutoConfiguration;
@@ -58,8 +57,6 @@ import org.springframework.transaction.annotation.Transactional;
public class BaseUnitTest {
@Import({
// holder
OrionCommonAutoConfiguration.class,
// mock
OrionMockBeanTestConfiguration.class,
OrionMockRedisTestConfiguration.class,
@@ -77,6 +74,7 @@ public class BaseUnitTest {
RedisAutoConfiguration.class,
RedissonAutoConfiguration.class,
})
// TODO
public static class Application {
}