我是新手,在基本问题上苦苦挣扎.我在我的项目中声明了一组编译时依赖项.我的问题陈述是,我想让依赖关系的子集不可传递,而剩下的传递.
我试图进行自编译,从编译扩展并将其传递属性设置为false.
Customcompile.extendsFrom(compile)
Customcompile.transitive = false
Run Code Online (Sandbox Code Playgroud)
通过这个,我假设我声明的任何内容都
Customcompile 'xxx:xxx:1.0'将transitive=false应用,并且它将充当编译时依赖性.
但是这不能用这些依赖项编译我的项目
在这个假设中,我错了吗?
我试图将切入点应用于子类中的已实现方法,但不会在此切入点周围调用AspectMethod.以下是我的配置和代码:
public abstract class ParentClass {
protected abstract void buildResponse(QueryResponse qryResp,ContentSearchServiceResponseImpl cssResp);
}
public class ChildClass extends ParentClass {
@override
public void buildResponse(QueryResponse qryResp,ContentSearchServiceResponseImpl ssResp){
//doSomething
}
Run Code Online (Sandbox Code Playgroud)
切入点:
<aop:pointcut id="pointcutId"
expression="execution(public * ParentClass.buildResponse(..))" />
Run Code Online (Sandbox Code Playgroud)
要么
<aop:pointcut id="pointcutId"
expression="execution(protected * ParentClass.buildResponse(..))" />
Run Code Online (Sandbox Code Playgroud)
要么
<aop:pointcut id="pointcutId"
expression="execution(public * ParentClass+.buildResponse(..))" />
Run Code Online (Sandbox Code Playgroud)
对于任何上述切入点的配置,Aspect都没有被创建.我已经尝试了几乎所有的东西.如果有人对此有所了解......我不能直接使用Child Class的名称,因为在我的情况下,多个子类正在实现这个抽象方法