springboot 单元测试 failed to resolve org.junit.platform:junit0platform:junit-platform-launcher

提示这一类的错误,一般都是没有依赖导致的
可以添加以下两个依赖到项目中

		<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-test</artifactId>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
        </dependency>

你可能感兴趣的:(笔记,java,junit,spring,boot,单元测试)