javassist.NotFoundException:XXXXXXXXXXXXXXXXXXXX

代码如下:

ClassPool pool = ClassPool.getDefault();
CtClass sp = pool.get(AbstractDBModel.class.getName());
在CS情况下运行正常,在WEB下报以上标题上错误,参照javassist说明,解决如下:

ClassPool pool = ClassPool.getDefault();
pool.insertClassPath(new ClassClassPath(AbstractDBModel.class));
CtClass sp = pool.get(AbstractDBModel.class.getName());

  

转载于:https://my.oschina.net/zhenghuazhi/blog/199043

你可能感兴趣的:(javassist.NotFoundException:XXXXXXXXXXXXXXXXXXXX)