第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號(hào)安全,請(qǐng)及時(shí)綁定郵箱和手機(jī)立即綁定
已解決430363個(gè)問題,去搜搜看,總會(huì)有你想問的

Spring 方法存在于代碼中,但不存在于 JAR 中

Spring 方法存在于代碼中,但不存在于 JAR 中

回首憶惘然 2021-08-06 10:57:10
我想調(diào)用該方法:https://github.com/spring-projects/spring-boot/blob/2.0.x/spring-boot-project/spring-boot-autoconfigure/src/main/java/org/springframework/boot/autoconfigure/web/ ErrorProperties.java#L73但它不可用。它甚至不存在于反編譯代碼中。但它應(yīng)該是,因?yàn)?JavaDoc 說它從 1.3.0 版本開始可用并且它是公開的。我的版本是 2.0.0,我也查了 1.5.4。我提供的鏈接是針對(duì) 2.0.x 的,在 GitHub 中它仍然存在。但是在代碼中它不可用,為什么?聚甲醛:<?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>test</groupId>    <artifactId>test</artifactId>    <version>1.0-SNAPSHOT</version>    <dependencies>        <dependency>            <groupId>org.springframework.boot</groupId>            <artifactId>spring-boot-autoconfigure</artifactId>            <version>2.0.0.RELEASE</version>        </dependency>    </dependencies></project>代碼:import org.springframework.boot.autoconfigure.web.ErrorProperties;public class Test {    ErrorProperties errorProperties = new ErrorProperties();    public Test() {        //Cannot resolve method getWhitelabel()        errorProperties.getWhitelabel();    }}
查看完整描述

1 回答

?
慕后森

TA貢獻(xiàn)1802條經(jīng)驗(yàn) 獲得超5個(gè)贊

該方法不在 2.0.0 中,也不在 2.0.3 中,而是在 2.0.4(當(dāng)前最新版本)中。


將您更改pom.xml為:


<dependencies>

    <dependency>

        <groupId>org.springframework.boot</groupId>

        <artifactId>spring-boot-autoconfigure</artifactId>

        <version>2.0.4.RELEASE</version>

    </dependency>

</dependencies>

它會(huì)編譯。


查看完整回答
反對(duì) 回復(fù) 2021-08-06
  • 1 回答
  • 0 關(guān)注
  • 156 瀏覽
慕課專欄
更多

添加回答

舉報(bào)

0/150
提交
取消
微信客服

購(gòu)課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動(dòng)學(xué)習(xí)伙伴

公眾號(hào)

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號(hào)