我正在尝试构建一个基本的 Spring-Boot 应用程序。我在控制器中使用 javax.validation。它将 EL 标记识别为 <c:out value="X" />,但是,java,spring,spring-boot"/>

首页 > 解决方案 > Spring-Boot java.lang.NullPointerException: null at javax.el.CompositeELResolver.add(CompositeELResolver...

我正在尝试构建一个基本的 Spring-Boot 应用程序。我在控制器中使用 javax.validation。它将 EL 标记识别为 <c:out value="X" />,但是

问题描述

标签: javaspringspring-boot

解决方案


我发现使应用程序工作的唯一方法。是将spring-boot配置为spring-mvc应用。

我在 POM 中进行了更改:(已添加)

 <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-tomcat</artifactId>
            <scope>provided</scope>
         
<!--The rest of dependencies passed from provided to compile-->

在 SpringApplication 中更改了一些 TomcatConfigurationBean(删除)

部署在 Tomcat 8.1 中,所有 <c:Tags 工作正常,无需更改


推荐阅读