
Spring
文章平均质量分 52
iails
这个作者很懒,什么都没留下…
展开
-
使用thymeleaf+spring security处理csrf时遇到Cannot create a session after the response has been committed
文章目录被这个问题折磨了几个小时,期间怀疑了各种代码,但最终还是让我发现了根本性的原因spring security中默认csrf是懒加载的,只有在第一次使用_csrf时才会创建session而thymeleaf页面的缓冲区满后,response会在模板渲染完毕前被提交,所以response已提交时,若在剩余的模板代码中使用了_csrf并且之前还没创建过session,就会报错还是用hea...原创 2018-09-23 21:59:26 · 1550 阅读 · 0 评论 -
Spring xml配置CloudSolrClient
<bean id="cloudSolrClient" class="org.apache.solr.client.solrj.impl.CloudSolrClient"> <constructor-arg name="zkHosts" value="xxx.com:2181,xxx.com:2182,xxx.com:2183"/> &原创 2019-03-12 20:26:33 · 574 阅读 · 0 评论 -
Spring 中 Bean 的生命周期
对beanFactory的修改实例化BeanFactoryPostProcessor,实例化前后不会被调用BeanPostProcessor的方法。BeanFactoryPostProcessorTest()BeanFactoryPostProcessor.postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)...原创 2019-10-10 00:44:43 · 189 阅读 · 0 评论