cost 225 ms
JUnit5 測試用例調用@Transactional function

[英]JUnit5 test case calls @Transactional function

給定一個帶有 TestMethod 的 TestClass 用於集成測試(在幕后產生 MySQL Testcontainer) 以及用 @Transactional 注釋的 Handler 實現 如果我運行這個測試,事務永遠不會打開,因為它需要從 Bean 調用到 Bean 以應用 @Transa ...

如何在springboot中手動注冊過濾器?

[英]How do I manually register filters in springboot?

我有三個Filter class:AFilter、BFilter、CFilter,並嘗試通過以下代碼注冊它們: 他們已經注冊到 beanfactory,但他們不是過濾器。 我怎樣才能把它們變成過濾器? 我的主要目標是使內置過濾器和用戶定義的過濾器可訂購。 使用上面AFilter、BFilter和C ...

請求的 bean 當前正在創建中:在將一個 spring 引導應用程序添加到另一個過程中是否存在無法解析的循環引用?

[英]Requested bean is currently in creation: Is there an unresolvable circular reference During adding one spring boot applciation to another?

場景:我有一個 springboot 應用程序,它執行類似批處理的功能(從 s3 處理讀取數據並寫入 sql 表)。 我還有一個單獨的 Jmix 應用程序。 所以需要將批處理添加到這個 jmix 應用程序,以便我可以從 jmix 應用程序運行批處理我能夠將它添加到 buid.gradle 中,我在 ...

如何正確定義hikari數據源

[英]How to correctly define hikari datasource

我有以下 bean 定義。 當我獲得應用程序上下文時。 拋出異常 有什么想法可能是什么原因? ...

Springboot 出現 Graphql 錯誤,“考慮在您的配置中定義類型為‘{component name}’的 bean”。

[英]Springboot with Graphql error with "Consider defining a bean of type '{component name}' in your configuration."

我正在使用 Spring 啟動與 graphql 和 rest。在添加 graphql 組件時,我使用了這樣的注釋。 Controller 服務 資料庫 但是得到了這些錯誤 它僅在使用測試時發生 我知道我可以使用 ComponentSacn,但我想知道為什么會這樣。 因為這個 package 與 ...

Spring Boot - 不是托管類型,創建 bean 時出錯

[英]Spring Boot - Not a managed type, Error creating bean

我想知道如何在我的 Spring Boot 項目中修復這些錯誤,我創建了一個非常簡單的項目,使用基於 Spring Security 的登錄/注冊,但我不知道如何修復這些東西,我已經嘗試了所有具有相同問題的建議,但這些都沒有幫助我:( 提前致謝! 我項目中的所有代碼: 安全配置 應用控制器 員工實體 ...

Spring 兩個外部包中的引導 bean 名稱沖突,無法控制外部代碼

[英]Spring boot bean name conflict in two external packages with no controll of the external code

我正在嘗試在 Spring Boot 3.0.0 中使用兩個依賴項 問題是它們都有一個名為“objectMapperProvider”的 Bean。 一種用於: 另一個用於: 我得到的錯誤是: 有沒有辦法解決這個問題,或者我是否需要確定優先級並選擇更重要的使用方法。 尋找其他解決方案。 ...

在哪里將 bean 添加到 Apache Ignite 配置文件?

[英]Where to add a bean to the Apache Ignite configuration file?

我有一個 Apache Ignite 集群,我正在嘗試將其與 Prometheus 堆棧集成,一切都很好,除了沒有生成指標。 這是我當前的配置文件:<?xml version="1.0" encoding="UTF-8"?> <beans xmlns="http://www.sp ...

如何綁定列表<string>到 ObservableList<string> ?</string></string>

[英]How to bind a List<String> to a ObservableList<String>?

我有一個包含List&lt;String&gt;的 object Bean 。 我想將此列表“綁定”到ObservableList ,以便在將項目添加到原始列表或從原始列表中刪除時,更新ObservableList (然后觸發監視ObservableList的偵聽器)。 我發現了這個問題,它的答案 ...

如何在應用程序中獲取 bean 變量的值

[英]How to fetch value of a bean variable inside the application

我有一個用例,我想聲明一個在應用程序啟動時初始化的 bean,稍后我想在條件表達式上使用 bean 的變量下面是代碼片段 現在我想通過條件表達式上已經注冊的 bean 在我的應用程序中使用變量 isXYZ 的值。 這就是我現在正在嘗試的方式。 但是我收到以下錯誤表達式解析失敗; 嵌套異常為 org. ...

@Component 在 spring 啟動時總是 null

[英]@Component always null in spring boot

我有兩個類被注釋為 @Component 我將它們注入不同的服務 但我的映射器一直是 null。我不會使用新命令創建新的 Object。 此外,對於我的存儲庫接口,一切都很好,所以我注入評論的方式(@AllArgsContrustor)工作正常。 請注意,我有測試類,我在服務類上使用了@Inje ...

將 POJO 存儲到 Spark 數據集

[英]Store POJOs to a Spark Dataset

我正在將Zeppelin連接到我的 rest 網絡服務,該服務通過OpenAPI返回城市:import java.util.Map; import fr.ecoemploi.application.etude.swagger.model.Commune; import fr.ecoemploi.a ...

如何從 SpringbootApplication 中的命令行參數創建和使用 bean 並使用它們?

[英]How to create and use beans from Command Line Argument in SpringbootApplication and use them?

我正在嘗試在我的 sprinbootApplication 中使用 ApplicationRunner 創建一個批處理作業,我想在我的代碼中使用命令行 arguments 作為變量。 所以我想提取命令行 arguments,從中生成 bean 並在我的代碼中使用它們。 如何實現?@SpringBo ...


 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM