You may wish to exclude one of them to ensure predictable runtime behavior

简介: You may wish to exclude one of them to ensure predictable runtime behavior

使用springboot遇到问题

Found multiple occurrences of org.json.JSONObject on the class path:
 
        jar:file:/C:/Users/Chloe/.m2/repository/org/json/json/20140107/json-20140107.jar!/org/json/JSONObject.class
        jar:file:/C:/Users/Chloe/.m2/repository/com/vaadin/external/google/android-json/0.0.20131108.vaadin1/android-json-0.0.20131108.vaadin1.jar!/org/json/JSONObject.class
 
You may wish to exclude one of them to ensure predictable runtime behavior

同类名引起冲突,通过下面方式排出冲突。

        <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>
                <exclusion>
                    <groupId>com.vaadin.external.google</groupId>
                    <artifactId>android-json</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

参考:https://stackoverflow.com/questions/52980064/maven-spring-boot-found-multiple-occurrences-of-org-json-jsonobject-on-the-cl

目录
相关文章
|
1月前
|
人工智能 机器人 测试技术
【CMake报错】Cannot specify compile definitions for target “PRIVATE“ which is not built...
【CMake报错】Cannot specify compile definitions for target “PRIVATE“ which is not built...
|
1月前
|
设计模式 人工智能 Java
Error: JavaFX runtime components are missing, and are required to run this application with Gradle e
Error: JavaFX runtime components are missing, and are required to run this application with Gradle e
125 1
|
1月前
target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target S
target overrides the `ALWAYS_EMBED_SWIFT_STANDARD_LIBRARIES` build setting defined in `Pods/Target S
21 0
|
1月前
|
JavaScript 程序员 Swift
The compiler is unable to type-check this expression in reasonable time; try breaking up the express
The compiler is unable to type-check this expression in reasonable time; try breaking up the express
23 0
|
1月前
|
JavaScript
解决报错did you register the component correctly? For recursive components, make sure to provide the “na
解决报错did you register the component correctly? For recursive components, make sure to provide the “na
|
1月前
Classic mode for store/ is deprecated and will be removed in Nuxt 3
Classic mode for store/ is deprecated and will be removed in Nuxt 3
62 0
|
6月前
Error: Plugin/Preset files are not allowed to export objects, only functions……
Error: Plugin/Preset files are not allowed to export objects, only functions……
|
10月前
|
开发工具
WARNING: library configuration mismatch
WARNING: library configuration mismatch
228 0
|
11月前
|
JavaScript
[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent .(一)
大致意思就是props接收到的从父组件传过来的tableData不能直接修改。
|
11月前
|
JavaScript
[Vue warn]: Avoid mutating a prop directly since the value will be overwritten whenever the parent .(二)
1.在data中声明一个变量接收props的值,然后再去改变data里的这个值 2. 用computed属性 3.用data保存数据,watch监听