Skip to content

Commit

Permalink
优化 admin 端配置逻辑
Browse files Browse the repository at this point in the history
  • Loading branch information
qmdx committed Jul 16, 2019
1 parent 51e0737 commit a24317e
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 12 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,8 @@
import com.baomidou.jobs.starter.handler.IJobsAlarmHandler;
import com.baomidou.jobs.starter.handler.JobsAlarmSimpleHandler;
import com.baomidou.jobs.starter.starter.EnableJobsAdmin;
import com.baomidou.jobs.starter.starter.JobsProperties;
import com.baomidou.mybatisplus.extension.plugins.PaginationInterceptor;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
Expand All @@ -19,13 +15,6 @@
*/
@EnableJobsAdmin
@Configuration
@EnableConfigurationProperties(JobsProperties.class)
@MapperScan("com.baomidou.jobs.admin.mapper*")
@ComponentScan(basePackages = {
"com.baomidou.jobs.admin.mapper",
"com.baomidou.jobs.admin.service",
"com.baomidou.jobs.admin.controller"
})
public class JobsAdminConfig {

/**
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
package com.baomidou.jobs.admin.service.impl;
package com.baomidou.jobs.admin.service;

import com.baomidou.mybatisplus.core.toolkit.StringUtils;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
package com.baomidou.jobs.starter.disruptor;

import com.baomidou.jobs.starter.starter.JobsProperties;
import com.lmax.disruptor.RingBuffer;
import com.lmax.disruptor.SleepingWaitStrategy;
import com.lmax.disruptor.WaitStrategy;
Expand All @@ -8,6 +9,7 @@
import com.lmax.disruptor.util.DaemonThreadFactory;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

Expand All @@ -20,6 +22,7 @@
* @since 2019-06-27
*/
@Configuration
@EnableConfigurationProperties(JobsProperties.class)
public class JobsDisruptorAutoConfiguration {

@Bean
Expand Down

0 comments on commit a24317e

Please sign in to comment.