-
-
Notifications
You must be signed in to change notification settings - Fork 45
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
77dc6c8
commit 6ed3bd2
Showing
9 changed files
with
240 additions
and
92 deletions.
There are no files selected for viewing
49 changes: 49 additions & 0 deletions
49
...nt-mirai/src/main/java/love/forte/simbot/component/mirai/configuration/AsMiraiConfig.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
/* | ||
* Copyright (c) 2020. ForteScarlet All rights reserved. | ||
* Project parent | ||
* File AsMiraiConfig.java | ||
* | ||
* You can contact the author through the following channels: | ||
* github https://github.com/ForteScarlet | ||
* gitee https://gitee.com/ForteScarlet | ||
* email [email protected] | ||
* QQ 1149159218 | ||
*/ | ||
|
||
package love.forte.simbot.component.mirai.configuration; | ||
|
||
import love.forte.common.configuration.annotation.AsConfig; | ||
import love.forte.common.utils.annotation.AnnotateMapping; | ||
|
||
import java.lang.annotation.*; | ||
|
||
/** | ||
* @author <a href="https://github.com/ForteScarlet"> ForteScarlet </a> | ||
*/ | ||
@Retention(RetentionPolicy.RUNTIME) //注解会在class字节码文件中存在,在运行时可以通过反射获取到 | ||
@Target({ElementType.TYPE}) //接口、类、枚举、注解、方法 | ||
@Documented | ||
@AsConfig | ||
@AnnotateMapping(AsConfig.class) | ||
public @interface AsMiraiConfig { | ||
|
||
|
||
/** 前缀,默认为空 */ | ||
String prefix() default "simbot.component.mirai"; | ||
|
||
/** 后缀,默认为空 */ | ||
String suffix() default ""; | ||
|
||
/** | ||
* 如果在配置类上标注此注解且此参数为 {@code true}, | ||
* 则没有标记 {@link love.forte.common.configuration.annotation.ConfigInject} 的字段也会被默认作为配置字段而添加。 | ||
*/ | ||
boolean allField() default false; | ||
|
||
/** | ||
* 进行深层注入,即会扫描父类的字段。 | ||
* @return | ||
*/ | ||
boolean deep() default true; | ||
|
||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
75 changes: 0 additions & 75 deletions
75
core-parent/core/src/main/resources/META-INF/spring-configuration-metadata.json
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
61 changes: 61 additions & 0 deletions
61
spring-boot-starter/component-mirai-spring-boot-starter/pom.xml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" | ||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | ||
<parent> | ||
<artifactId>spring-boot-starter</artifactId> | ||
<groupId>love.forte.simple-robot</groupId> | ||
<version>2.0.0-ALPHA.2</version> | ||
</parent> | ||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<artifactId>component-mirai-spring-boot-starter</artifactId> | ||
|
||
<dependencies> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-configuration-processor</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.springframework.boot</groupId> | ||
<artifactId>spring-boot-autoconfigure</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>love.forte.simple-robot</groupId> | ||
<artifactId>core-spring-boot-starter</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>love.forte.simple-robot</groupId> | ||
<artifactId>component-mirai</artifactId> | ||
<exclusions> | ||
<!-- exclusion log. --> | ||
<exclusion> | ||
<groupId>love.forte.common</groupId> | ||
<artifactId>log</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>love.forte.common</groupId> | ||
<artifactId>configuration</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>love.forte.common</groupId> | ||
<artifactId>ioc</artifactId> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.projectlombok</groupId> | ||
<artifactId>lombok</artifactId> | ||
<version>1.18.12</version> | ||
<optional>true</optional> | ||
<scope>provided</scope> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
||
</project> |
Oops, something went wrong.