AspectJ: ClassLoading issue when trying to use external aop.xml file

后端 未结 3 963
慢半拍i
慢半拍i 2021-01-06 09:46

I m trying to externalize the configuration of aop.xml so I removed the aop.xml from META-INF and made it available in the server for manual config

3条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-06 10:33

    What I ended up doing is changing the LOG Level for the error message from ERROR to DEBUG, as I don't see this as an ERROR ( at least in my case ). this case I can still see the error when I enable the DEBUG level. so I modified the source file below and rebuild my aspectjweaver-1.7.1.jar

    try {
        registerOptions(weaver, loader, definitions);
        registerAspectExclude(weaver, loader, definitions);
        registerAspectInclude(weaver, loader, definitions);
        success = registerAspects(weaver, loader, definitions);
        registerIncludeExclude(weaver, loader, definitions);
        registerDump(weaver, loader, definitions);
    } catch (Exception ex) {
        //(CHANGE 1) trace.error("register definition failed", ex);
        trace.debug( "register definition failed" + ex.getMessage());
        success = false;
        // (CHANGE 2) warn("register definition failed", (ex instanceof AbortException) ? null : ex);
        debug("register definition failed" + ((ex instanceof AbortException) ? null : ex));
    }
    

提交回复
热议问题