-
Notifications
You must be signed in to change notification settings - Fork 154
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
Showing
9 changed files
with
86 additions
and
6 deletions.
There are no files selected for viewing
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
22 changes: 22 additions & 0 deletions
22
...cean-plugin-test/src/test/java/com/xiaomi/youpin/docean/plugin/test/ConfigPluginTest.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,22 @@ | ||
package com.xiaomi.youpin.docean.plugin.test; | ||
|
||
import com.xiaomi.youpin.docean.Ioc; | ||
import com.xiaomi.youpin.docean.plugin.test.config.ConfigService; | ||
import org.junit.Test; | ||
|
||
/** | ||
* @author [email protected] | ||
* @date 2023/12/8 13:46 | ||
*/ | ||
public class ConfigPluginTest { | ||
|
||
|
||
@Test | ||
public void testConfigPlugin() { | ||
Ioc ioc = Ioc.ins().init("com.xiaomi.youpin.docean.plugin.test.config","com.xiaomi.youpin.docean.plugin.config"); | ||
ConfigService configService = ioc.getBean(ConfigService.class); | ||
System.out.println(configService.getVal()); | ||
System.out.println(configService.hi()); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
...-plugin-test/src/test/java/com/xiaomi/youpin/docean/plugin/test/config/ConfigService.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,30 @@ | ||
package com.xiaomi.youpin.docean.plugin.test.config; | ||
|
||
import com.xiaomi.youpin.docean.anno.Service; | ||
import com.xiaomi.youpin.docean.plugin.config.anno.Value; | ||
import lombok.Getter; | ||
|
||
import javax.annotation.Resource; | ||
|
||
/** | ||
* @author [email protected] | ||
* @date 2023/12/8 13:47 | ||
*/ | ||
|
||
@Service | ||
public class ConfigService { | ||
|
||
@Resource(name = "^ddd") | ||
private Demo demo; | ||
|
||
@Getter | ||
@Value("$ddd") | ||
private String val; | ||
|
||
public String hi() { | ||
return demo.hi(); | ||
} | ||
|
||
|
||
|
||
} |
16 changes: 16 additions & 0 deletions
16
...in/docean-plugin-test/src/test/java/com/xiaomi/youpin/docean/plugin/test/config/Demo.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,16 @@ | ||
package com.xiaomi.youpin.docean.plugin.test.config; | ||
|
||
import com.xiaomi.youpin.docean.anno.Component; | ||
|
||
/** | ||
* @author [email protected] | ||
* @date 2023/12/8 14:04 | ||
*/ | ||
@Component | ||
public class Demo { | ||
|
||
public String hi() { | ||
return "hi"; | ||
} | ||
|
||
} |
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
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
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
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
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 |
---|---|---|
|
@@ -6,5 +6,7 @@ download_file_path=/tmp/v | |
|
||
demoVo=com.xiaomi.youpin.docean.test.demo.DemoVo | ||
|
||
val=123 | ||
|
||
|
||
|