<security:http auto-config="true">
用以下内容替换本节:
<security:http auto-config="true" use-expressions="true">
注意:
作为一个旁注,我从代码和注释中看到,我怀疑您从GuestBookDAOImpl注入了SessionFactory,这会导致在DAO层上的方法调用时发生NPE。从xml配置或注释中注入它。

<security:http auto-config="true">
用以下内容替换本节:
<security:http auto-config="true" use-expressions="true">
注意:
作为一个旁注,我从代码和注释中看到,我怀疑您从GuestBookDAOImpl注入了SessionFactory,这会导致在DAO层上的方法调用时发生NPE。从xml配置或注释中注入它。