-
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.
I hope to implement a feature where the name of the Resource can be d…
…ynamically configured during IoC, so that different view classes can be used at runtime. (close #754)
- Loading branch information
Showing
6 changed files
with
88 additions
and
2 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
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
25 changes: 25 additions & 0 deletions
25
jcommon/docean/src/test/java/com/xiaomi/youpin/docean/test/demo/mydemo/DemoCall.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,25 @@ | ||
package com.xiaomi.youpin.docean.test.demo.mydemo; | ||
|
||
import com.xiaomi.youpin.docean.anno.Service; | ||
|
||
import javax.annotation.Resource; | ||
|
||
/** | ||
* @author [email protected] | ||
* @date 2023/11/18 14:52 | ||
*/ | ||
|
||
|
||
@Service | ||
public class DemoCall { | ||
|
||
@Resource(name = "$demoName") | ||
private MyDemo demo; | ||
|
||
|
||
public String hi() { | ||
return demo.hi(); | ||
} | ||
|
||
|
||
} |
11 changes: 11 additions & 0 deletions
11
jcommon/docean/src/test/java/com/xiaomi/youpin/docean/test/demo/mydemo/MyDemo.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,11 @@ | ||
package com.xiaomi.youpin.docean.test.demo.mydemo; | ||
|
||
/** | ||
* @author [email protected] | ||
* @date 2023/11/18 14:50 | ||
*/ | ||
public interface MyDemo { | ||
|
||
String hi(); | ||
|
||
} |
15 changes: 15 additions & 0 deletions
15
jcommon/docean/src/test/java/com/xiaomi/youpin/docean/test/demo/mydemo/MyDemo1.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,15 @@ | ||
package com.xiaomi.youpin.docean.test.demo.mydemo; | ||
|
||
import com.xiaomi.youpin.docean.anno.Component; | ||
|
||
/** | ||
* @author [email protected] | ||
* @date 2023/11/18 14:50 | ||
*/ | ||
@Component | ||
public class MyDemo1 implements MyDemo{ | ||
@Override | ||
public String hi() { | ||
return "demo1"; | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
jcommon/docean/src/test/java/com/xiaomi/youpin/docean/test/demo/mydemo/MyDemo2.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,15 @@ | ||
package com.xiaomi.youpin.docean.test.demo.mydemo; | ||
|
||
import com.xiaomi.youpin.docean.anno.Component; | ||
|
||
/** | ||
* @author [email protected] | ||
* @date 2023/11/18 14:50 | ||
*/ | ||
@Component | ||
public class MyDemo2 implements MyDemo{ | ||
@Override | ||
public String hi() { | ||
return "demo2"; | ||
} | ||
} |