Class.forname
can get the class object by name of the java class. Here, I want to give the class an alias by annotation. For example
@Component("foo")
class Foo {
private String id;
}
How to get the Foo Class with the annotation field String "foo" in java reflection or using Spring?
Aucun commentaire:
Enregistrer un commentaire