method one
This way is very simple, only need Mapper接口
the add a comment @Mapper
to.
Second way
Hey, this approach is also very simple, only need 启动类
plus a @MapperScan(“com.rong.blog.mapper”)
can comment.
Three ways
Write yourself in a configuration class.
Note Yo, none of the above are several ways to use @Repository
annotations, after Baidu out the specific reasons plus.
Without @Repository
when injected Mapper comment on IDEA compiler, an error, however 并不是真的错误
. If you do not want this error occurs, you can add.