dongma commented on issue #5:
URL: 
https://github.com/apache/incubator-hugegraph/issues/5#issuecomment-1666306874

   > fastjson的冲突是因为1.2.36版本以上 实现了Jersey 的AutoDiscoverable 导致的,在工程启动类中把 
FastJsonAutoDiscoverable的autoDiscover设置为false可以解决高版本fastjson冲突问题,
   
   
   ```java
   package com.alibaba.fastjson.support.jaxrs;
   
   import jakarta.ws.rs.core.FeatureContext;
   import org.glassfish.jersey.internal.spi.AutoDiscoverable;
   
   /**
    * @Title: FastJsonAutoDiscoverable
    * @Description: fastjson使用SPI在jvm中加载class,高版本与hugegraph结合使用时,并不存在javax.ws的包,
    *   重写内容,编译后替换classpath中fastjson的同名class文件
    */
   public class FastJsonAutoDiscoverable implements AutoDiscoverable {
   
       public static final String FASTJSON_AUTO_DISCOVERABLE = 
"fastjson.auto.discoverable";
   
       public volatile static boolean autoDiscover = true;
   
       static {
           try {
               autoDiscover = Boolean.parseBoolean(
                       System.getProperty(FASTJSON_AUTO_DISCOVERABLE, 
String.valueOf(autoDiscover)));
           } catch (Throwable ex) {
               //skip
           }
       }
   
       public void configure(final FeatureContext context) {
   
       }
   
   }
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to