如何为空函数切入点编写junit测试

lqfhib0f  于 2021-07-06  发布在  Java
关注(0)|答案(1)|浏览(236)

我正在尝试为此方法编写一个junit测试。我不熟悉切入点。有什么建议吗?

/**
     * Pointcut that matches all repositories, services and Web REST endpoints.
     */
    @Pointcut("within(@org.springframework.stereotype.Repository *)" +
        " || within(@org.springframework.stereotype.Service *)" +
        " || within(@org.springframework.web.bind.annotation.RestController *)")
    public void springBeanPointcut() {
        // Method is empty as this is just a Pointcut, the implementations are in the advices.
    }
bq3bfh9z

bq3bfh9z1#

只需做一个新的测试并让它调用springbeanpointcut()

相关问题