有错误信息:Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause

 

Springboot项目编译不出问题,访问页面时出现"Servlet.service() for servlet [dispatcherServlet] in context with path "

错误原因:在Intellij中application.properties中定义了spring.velocity.toolbox-config-location=toolbox.xml,但是我本身并没有引入toolbox.xml这个文件,导致访问时缺乏toolbox中的相关工具,而我插入了一个关于日期的toolbox应用:

<toolbox>
    <tool>
        <key>date</key>
        <scope>application</scope>
        <class>org.apache.velocity.tools.generic.DateTool</class>
    </tool>
</toolbox>

则会出现警告,但是运行没问题,可以访问该前端页面:

 Springboot项目编译不出问题,访问页面时出现"Servlet.service() for servlet [dispatcherServlet] in context with path "

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-01-09
  • 2021-11-02
  • 2021-10-04
  • 2022-12-23
猜你喜欢
  • 2021-04-10
  • 2022-12-23
  • 2021-11-01
  • 2022-01-10
  • 2021-10-05
  • 2021-10-10
  • 2021-05-06
相关资源
相似解决方案