亚洲在线久爱草,狠狠天天香蕉网,天天搞日日干久草,伊人亚洲日本欧美

為了賬號安全,請及時綁定郵箱和手機立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

org.springframework.boot.web.support.does 不存在

org.springframework.boot.web.support.does 不存在

神不在的星期二 2021-12-10 10:10:11
我正在將 Spring Boot 應用程序從 maven 遷移到 bazel。我已經將我的工作區中 pom.xml 的所有依賴項列為 maven_jar()s。我收到一個錯誤,說 org.springframework.boot.web.support 包不存在。它屬于我已經包含的 org.springframework.boot jar。我能做些什么來解決這個問題?我的 pom.xml<?xml version="1.0" encoding="UTF-8"?><project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"    xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">    <modelVersion>4.0.0</modelVersion>    <groupId>com.example.abc</groupId>    <artifactId>abcclient</artifactId>    <version>0.0.1-SNAPSHOT</version>    <packaging>war</packaging>    <name>abcclient</name>    <description>ABC Client</description>    <parent>        <groupId>org.springframework.boot</groupId>        <artifactId>spring-boot-starter-parent</artifactId>        <version>1.5.2.RELEASE</version>        <relativePath /> <!-- lookup parent from repository -->    </parent>    <properties>        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>    </properties>    <dependencies>        <dependency>            <groupId>org.springframework.boot</groupId>            <artifactId>spring-boot-starter-aop</artifactId>        </dependency>        <dependency>            <groupId>org.springframework.boot</groupId>            <artifactId>spring-boot-starter-web</artifactId>        </dependency>        <dependency>            <groupId>org.springframework.boot</groupId>            <artifactId>spring-boot-starter-test</artifactId>            <scope>test</scope>        </dependency>        <dependency>            <groupId>org.apache.tomcat.embed</groupId>            <artifactId>tomcat-embed-jasper</artifactId>            <scope>provided</scope>        </dependency>        <dependency>            <groupId>javax.servlet</groupId>            <artifactId>jstl</artifactId>            <scope>provided</scope>        </dependency>    </dependencies>
查看完整描述

1 回答

?
達令說

TA貢獻1821條經驗 獲得超6個贊

您正在更改 Spring Boot 版本,因此您必須更改所有support導入:

彈簧靴 1.5

import org.springframework.boot.web.support

彈簧靴 2.0

import org.springframework.boot.web.servlet.support

這是因為基于 Servlet 的 Web 服務器的支持類已移至新包中。


查看完整回答
反對 回復 2021-12-10
  • 1 回答
  • 0 關注
  • 778 瀏覽
慕課專欄
更多

添加回答

舉報

0/150
提交
取消
微信客服

購課補貼
聯系客服咨詢優惠詳情

幫助反饋 APP下載

慕課網APP
您的移動學習伙伴

公眾號

掃描二維碼
關注慕課網微信公眾號