是可以互换的。图一是其中一个测试,把DaoImpl中的@Repository换为@Service,可以正确运行。 图二是 @Repository 和 @Service 和 @Controller三者完全互换例子的,一张截图。 END