1. 程式人生 > >but was actually of type [com.sun.proxy.$Proxy13]

but was actually of type [com.sun.proxy.$Proxy13]

ssm在註解整合時提示Bean named 'studentservice' is expected to be of type 'com.shuai.service.imp.studentServiceImpl',but was actually of type [com.sun.proxy.$Proxy13]

錯誤在(這裡應該是全部還有dao層)

@Controller
public class testController {
        @Resource
        private testImpl

testImpl;
        @RequestMapping("/addFload")
        public void addFload(String fname){
            fload fload = new fload();
            fload.setfName(fname);
            testImpl.addTest(fload);
        }
}

這裡不應該是介面實現類。應該是介面

@Controller
public class testController {
        @Resource
        private testService testImpl;
        @RequestMapping("/addFload")
        public void addFload(String fname){
            fload fload = new fload();
            fload.setfName(fname);
            testImpl.addTest(fload);
        }
}