Caused by: java.lang.Error: Unresolved compilation problem:
The method getPassword() is undefined for the type User
at com.raysmond.blog.services.UserService.createUser(UserService.java:38)
at com.raysmond.blog.services.UserService.getSuperUser(UserService.java:46)
at com.raysmond.blog.services.UserService.initialize(UserService.java:34)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:497)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleElement.invoke(InitDestroyAnnotationBeanPostProcessor.java:354)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor$LifecycleMetadata.invokeInitMethods(InitDestroyAnnotationBeanPostProcessor.java:305)
at org.springframework.beans.factory.annotation.InitDestroyAnnotationBeanPostProcessor.postProcessBeforeInitialization(InitDestroyAnnotationBeanPostProcessor.java:133)
... 44 more
Caused by: java.lang.Error: Unresolved compilation problem: The method getPassword() is undefined for the type User
当我添加上getter、setter方法就ok了,是我少导入jar包了吗?