覆盖方法会覆盖父注释吗?

Overriding a method overrides parent annotations?

覆盖方法是否覆盖父注释?例如:

public interface CustomRepository {
    @Cacheable("top10UsersCache")
    List<User> getTop10Users();
}

interface CustomFeignRepository extends CustomRepository {
    @Override
    @GetMapping("top10Users")
    List<User> getTop10Users(); 
}

方法getTop10Users()(来自Feign库)它仍然可以缓存吗?

要继承方法/class注解,注解本身必须注解@Inherited .