How to call DAO layer controller layer

In fact, very simple, just add a @Autowired

Then call writing: modifiers dao class name variable name;

Do not need new

 @Autowired
    private UserDao userDao;

 

Guess you like

Origin www.cnblogs.com/hzyhx/p/11105044.html