Skip to content

Commit

Permalink
[Improve] Optimize spring auto configuration registry (#2304)
Browse files Browse the repository at this point in the history
Signed-off-by: yuluo-yx <[email protected]>
Co-authored-by: tomsun28 <[email protected]>
  • Loading branch information
yuluo-yx and tomsun28 authored Jul 20, 2024
1 parent 70af066 commit 6421fef
Show file tree
Hide file tree
Showing 13 changed files with 19 additions and 92 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@

package org.apache.hertzbeat.alert.config;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

/**
* Alert auto configuration.
*/

@AutoConfiguration
@ComponentScan(basePackages = "org.apache.hertzbeat.alert")
public class AlerterAutoConfiguration {
}
17 changes: 0 additions & 17 deletions alerter/src/main/resources/META-INF/spring.factories

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

org.apache.hertzbeat.alert.config.AlerterAutoConfiguration
org.apache.hertzbeat.alert.config.AlerterAutoConfiguration
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@

package org.apache.hertzbeat.collector.config;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

/**
* Collector Auto Configuration
* @version 2.1
*/

@AutoConfiguration
@ComponentScan(basePackages = "org.apache.hertzbeat.collector")
public class CollectorAutoConfiguration {
}
17 changes: 0 additions & 17 deletions collector/src/main/resources/META-INF/spring.factories

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

org.apache.hertzbeat.collector.config.CollectorAutoConfiguration
org.apache.hertzbeat.collector.config.CollectorAutoConfiguration
Original file line number Diff line number Diff line change
Expand Up @@ -18,16 +18,17 @@
package org.apache.hertzbeat.common.config;

import org.apache.hertzbeat.common.util.AesUtil;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;

/**
* common module config
*/

@AutoConfiguration
@ComponentScan(basePackages = "org.apache.hertzbeat.common")
@EnableConfigurationProperties(CommonProperties.class)
@Configuration
public class CommonConfig {

public CommonConfig(CommonProperties commonProperties) {
Expand Down
18 changes: 0 additions & 18 deletions common/src/main/resources/META-INF/spring.factories

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,14 @@

package org.apache.hertzbeat.push.config;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

/**
* push configuration
*/

@AutoConfiguration
@ComponentScan(basePackages = "org.apache.hertzbeat.push")
public class PushAutoConfiguration {
}
17 changes: 0 additions & 17 deletions push/src/main/resources/META-INF/spring.factories

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -15,14 +15,17 @@
* limitations under the License.
*/

package org.apache.hertzbeat.warehouse;
package org.apache.hertzbeat.warehouse.config;

import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

/**
* WarehouseAutoConfiguration class
* @version 2.1
*/

@AutoConfiguration
@ComponentScan(basePackages = "org.apache.hertzbeat.warehouse")
public class WarehouseAutoConfiguration {
}
17 changes: 0 additions & 17 deletions warehouse/src/main/resources/META-INF/spring.factories

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,4 @@
# See the License for the specific language governing permissions and
# limitations under the License.

org.apache.hertzbeat.warehouse.WarehouseAutoConfiguration
org.apache.hertzbeat.warehouse.config.WarehouseAutoConfiguration

0 comments on commit 6421fef

Please sign in to comment.