Home  >  Q&A  >  body text

java - Jackson库的ObjectMapper类在was6环境上找不到部分方法

本地也是was6环境 可以正确运行, 发布到测试环境后,ObjectMapper类 报错找不到部分方法,我用反射打印方法和对应参数,结果,环境上比本地 要少输出10多个方法,百思不得其解。。。用的是这个版本jackson-all-1.9.11.jar

天蓬老师天蓬老师2717 days ago357

reply all(2)I'll reply

  • 黄舟

    黄舟2017-04-17 17:28:24

    It is recommended to carefully compare the differences in jar packages in the two environments to see if there are other versions of json packages and whether there are conflicts

    reply
    0
  • PHP中文网

    PHP中文网2017-04-17 17:28:24

    Try this maven configuration.

     <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-core</artifactId>
        <version>2.5.0</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-annotations</artifactId>
        <version>2.5.0</version>
    </dependency>
    <dependency>
        <groupId>com.fasterxml.jackson.core</groupId>
        <artifactId>jackson-databind</artifactId>
        <version>2.5.0</version>
    </dependency>

    reply
    0
  • Cancelreply