问个问题,现在用spring boot 集成了spring security和freemarker,然后想在freemarker的页面中使用security标签
页面是这样引用的
然后.tld文件放在了resources文件夹下
POM文件中引入了security-taglib的依赖
用main运行之后一直报错
freemarker.template.TemplateModelException: Error while loading tag library for URI "/security.tld" from TLD location "servletContext:/security.tld"; see cause exception.
...中间内容省略
Caused by: java.io.IOException: Resource not found: servletContext:/security.tld
2017-03-21 14:59:51.062 ERROR 8448 --- [nio-8080-exec-2] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is freemarker.template.TemplateModelException: Error while loading tag library for URI "/security.tld" from TLD location "servletContext:/security.tld"; see cause exception.
----
FTL stack trace ("~" means nesting-related):
- Failed at: #assign security = JspTaglibs["/secur... [in template "login.ftl" at line 2, column 1]
----] with root cause
有用点的信息就是
百度了好久,但是一直没能解决,哪位大神帮帮忙,谢谢