Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
64 views
in Technique[技术] by (71.8m points)

java - How to use beans from @Import class from an inherited class?

I have a config class B which uses the @Import annotation to import config class A, in this manner

@Configuration
@Import({A.class})
public class B {
...
}

Now I have a class C which extends class B, but I am not able to access methods of class A from that. How can I do this ?

P.s I can only edit class C since rest are libraries

question from:https://stackoverflow.com/questions/65557869/how-to-use-beans-from-import-class-from-an-inherited-class

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...