Exception in thread "main" java.lang.NoClassDefFoundError: javax/persistence/Cacheable 原来是需要hibernate下面的JPA的包啊。导入就可以了。