gpt4 book ai didi

java - Spring boot - 添加 JSTL 依赖会导致问题

转载 作者:行者123 更新时间:2023-12-02 10:51:10 25 4
gpt4 key购买 nike

我是 Spring Boot 新手。我想在 JSP 页面中使用 jSTL 标签。为此,我添加了以下依赖项

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-tomcat</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap</artifactId>
<version>3.3.6</version>
</dependency>

<dependency>
<groupId>org.webjars</groupId>
<artifactId>bootstrap-datepicker</artifactId>
<version>1.0.1</version>
</dependency>

<dependency>
<groupId>org.webjars</groupId>
<artifactId>jquery</artifactId>
<version>1.9.1</version>
</dependency>

<!-- Use MySQL Connector-J -->

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
</dependency>

<!-- Hibernate -->
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-core</artifactId>
</dependency>

<dependency>
<groupId>javax.servlet</groupId>
<artifactId>jstl</artifactId>
</dependency>

</dependencies>

每当我添加 jSTL 依赖项时,项目都不会启动,但在删除它时会启动。

Deploying on Apache Tomcat 8.0.27.0 profile mode: false debug mode: true force redeploy: true Undeploying ... undeploy?path=/demo OK - Undeployed application at context path /demo In-place deployment at

运行应用程序时出现以下错误。

C:\Users\Nishan Dhungana\Documents\NetBeansProjects\SpringBootTest\target\demo-0.0.1-SNAPSHOT deploy?config=file%3A%2FC%3A%2FUsers%2FNISHAN%7E1%2FAppData%2FLocal%2FTemp%2Fcontext3041249382478705791.xml&path=/demo FAIL - Deployed application at context path /demo but context failed to start

最佳答案

也在您的 pom.xml 中添加此依赖项

<dependency>
<groupId>jstl</groupId>
<artifactId>jstl</artifactId>
<version>1.2</version>
</dependency>

希望这对您有帮助!

关于java - Spring boot - 添加 JSTL 依赖会导致问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/52171021/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com