can not access a member of class org.springframework.aop.TruePointcut with modifiers public

前端 未结 2 1250
傲寒
傲寒 2021-02-02 14:32

I am developing a Spring application using Struts and the Struts JSON plugin. When I run the application it gives the following error (in Firebug):

org.apache.st         


        
2条回答
  •  悲哀的现实
    2021-02-02 15:17

    In my case I was trying to access public constructor of a non public class.

    class MyClass {
      public MyClass() {}
    }
    
    //...
    MyClass c = JsonIterator.deserialize(bytes, MyClass.class)
    

    Throws: ReflectionMapDecoder can not access a member of class MyClass with modifiers "public"

    Added public and it works.

    public class MyClass {
      public MyClass() {}
    }
    

    HTH

提交回复
热议问题