Maven + Spring Boot: Found multiple occurrences of org.json.JSONObject on the class path:

后端 未结 6 1461
离开以前
离开以前 2020-12-13 13:17

When I run mvn test I get this warning. How can I fix it?

Found multiple occurrences of org.json.JSONObject on the class path:

        jar:fil         


        
6条回答
  •  渐次进展
    2020-12-13 13:47

    Add under

     spring-boot-starter-test
        test
    

    The following exclusion:

     test
        
            
                com.vaadin.external.google
                android-json
            
        
    

    Similarly, for Gradle projects:

    testCompile("org.springframework.boot:spring-boot-starter-test") {
        exclude group: "com.vaadin.external.google", module:"android-json"
    }
    

提交回复
热议问题