【发布时间】:2013-08-02 02:28:36
【问题描述】:
我正在努力理解 Spring 框架。我曾经使用 Java EE。
我写接口和实现的时候,可以在接口上使用注解吗?
@Repository // Can I do this?
interface MyRepository {
}
@Repository // Can I omit this?
class MyRepositoryImpl implements MyRepository {
}
@Service 呢?一样吗?
【问题讨论】:
-
@ArunM One of the answer 是我想知道的。我认为不是问题。
-
Where to put @Transactional。我第二个@Bozho 回答
标签: spring annotations