spring学习bug记录:引入了junit还是用不了@Test注解

    xiaoxiao2025-05-13  14

    Q:引入了junit还是用不了@Test注解

    pom.xml配置如下:

    <dependency> <groupId>junit</groupId> <artifactId>junit</artifactId> <version>4.11</version> <scope>test</scope> </dependency>

    A:<scope>限定了包的使用范围,去掉<scope>test</scope>即可

    最新回复(0)