為什么@Autowired 和private UserDOMapper userDOMapper有錯(cuò)但還能執(zhí)行
Could not autowire. No beans of 'UserDOMapper' type found.
但在瀏覽器中出現(xiàn)了結(jié)果?
為什么??
Could not autowire. No beans of 'UserDOMapper' type found.
但在瀏覽器中出現(xiàn)了結(jié)果?
為什么??
舉報(bào)
2021-01-15
autowired應(yīng)該是idea建議使用construtor來(lái)構(gòu)建的一種引入方式 mapper上的紅線是idea和mybatis融合的不好的問(wèn)題 不影響使用 如果你看著難受可以在mapper的接口文件里的頭部加上@Repository注解