我应该把@Transactional注释放在哪里:在接口定义上还是在实现类上?
2022-08-31 10:34:53
代码中标题中的问题:
@Transactional (readonly = true)
public interface FooService {
void doSmth ();
}
public class FooServiceImpl implements FooService {
...
}
与
public interface FooService {
void doSmth ();
}
@Transactional (readonly = true)
public class FooServiceImpl implements FooService {
...
}