我正在尝试为此方法编写一个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.
}
1条答案
按热度按时间bq3bfh9z1#
只需做一个新的测试并让它调用springbeanpointcut()