I am using a custom @ComponentScan.Filter(type = FilterType.CUSTOM, classes = {MyFilterType.class}) If MyFilterType is an internal class, an error will be reported. After investigation, it was found that it was caused by parsing @ComponentScan.Filter(type = FilterType.CUSTOM, classes = {MyFilterType.class}). If it is an inner class, constructors[0].getParameterCount() > 0 will be equal to true. In fact, there are no parameters.
Error content: Caused by: java.lang.IllegalStateException: Illegal method parameter type: org.tong.learn.tripartite_function.GlobalBeanConfig
Error code:
1、Judgment Constructor parameters
2、Error parsing constructor parameters
Comment From: snicoll
MyFilterType should be static. If it isn't, we need access to the parent instance to create it and it's impossible for us to do that. Going forward, please show your code or share a sample project, rather than screenshots of our own code.
Comment From: CodeMan-cmd
MyFilterTypeshould bestatic. If it isn't, we need access to the parent instance to create it and it's impossible for us to do that. Going forward, please show your code or share a sample project, rather than screenshots of our own code.
OK