- 
                Notifications
    
You must be signed in to change notification settings  - Fork 1.8k
 
Open
Description
调用
Method declaredMethod = bean.getClass().getDeclaredMethod(
		"set" + propertyValue.getName().substring(0, 1).toUpperCase()
				+ propertyValue.getName().substring(1), value.getClass());抛出异常
java.lang.NoSuchMethodException: us.codecraft.tinyioc.HelloWorldServiceImpl.setOutputService(us.codecraft.tinyioc.OutputServiceImpl)
但是HelloWorldServiceImpl有这个set方法
package us.codecraft.tinyioc;
/**
 * @author yihua.huang@dianping.com
 */
public class HelloWorldServiceImpl implements HelloWorldService {
    private String text;
    private OutputService outputService;
    @Override
    public void helloWorld() {
        outputService.output(text);
    }
    public void setText(String text) {
        this.text = text;
    }
    public void setOutputService(OutputService outputService) {
        this.outputService = outputService;
    }
    public OutputService getOutputService() {
        return outputService;
    }
}Metadata
Metadata
Assignees
Labels
No labels