出现该错误可能是运用hibernate的getSession().get(Example.class,id),而传给该方法的id参数为null,会报id to load is required for loading错误