jar 包引入后代码中无法引用

问题:

引入jar包后无法引用到jar包内容

排查:

查看maven 引入的jar包状态,如果状态是 rutime,则编译期间不会获取到

解决方法:

在引入中指定scope: <scope>compile</scope>

        <dependency>
            <groupId>org.aspectj</groupId>
            <artifactId>aspectjweaver</artifactId>
            <version>${aspect.version}</version>
            <scope>compile</scope>
        </dependency>

猜你喜欢

转载自blog.csdn.net/qq_37570710/article/details/114026829