[英]Spring security for non-Springboot app is not working
我試圖在 Spring 4 中為我的端點啟用基本身份驗證。但它似乎沒有做任何事情。 任何的想法? 如果我放斷點,我只能看到在服務器啟動時調用了configure方法。 我的 web.xml http://localhost:8080/TestWeb3/rest/health 無需身份 ...
[英]Spring security for non-Springboot app is not working
我試圖在 Spring 4 中為我的端點啟用基本身份驗證。但它似乎沒有做任何事情。 任何的想法? 如果我放斷點,我只能看到在服務器啟動時調用了configure方法。 我的 web.xml http://localhost:8080/TestWeb3/rest/health 無需身份 ...
[英]Struts 2.5 Junit test setup with spring integration
支柱版本:2.5.25 春季版本:4.3.26 使用:struts2-rest-plugin、struts2-spring-plugin、JUnit 4 我正在尋求幫助以糾正我的單元測試配置,該配置當前拋出異常“ServletContext 不能為空”。 下面是堆棧跟蹤: 單元測試(spr ...
[英]Spring4 MVC keep session alive forever
我有一個場景,session 在一段時間不活動后會過期,但我需要讓 Spring 4 MVC 讓 session 永遠活着。 下面是我的 Spring 初始化程序 class, '''public class SpringWebAppInitializer 實現 WebApplicationIni ...
[英]Spring @Conditional based on a value in database table
條件評估取決於數據庫表中提供的值 由於條件執行得非常早,無法獲取數據庫值是否有其他方法可以實現此目的? ...
[英]springdoc-openapi + Spring 4 Compatibility
I have an existing Spring 4 API and have successfully integrated springdoc-openapi to generate the OpenAPI 3 spec in JSON/YAML and also display the S ...
[英]Spring 4 Session Cookie change field
我正在使用 Spring 4,我使用request.getSession()創建了一個會話 我觀察到創建了一個 SESSION cookie。 響應頭包含如下: 在創建的 Cookie 中,我需要 SameSite=Lax。 目前,SameSite 沒有價值。 所以在我的代碼中,我做了以下嘗試 ...
[英]Facing deprecated issue after migrating iBatis to MyBatis into spring 4
When i migrate spring 3 to spring 4, iBatis is no longer support for spring 4. After google, i have added dependency 'mybatis-2-spring' into pox.xml ...
[英]LocalContainerEntityManagerFactoryBean hibernate configuration bean is initialized in a loop
I have my hibernate entity manager factory declared in jpa.xml, hazecast configured in hazelcast.xml and I have domain model setup and I have corresp ...
[英]org.jboss.as.ejb3.component.EJBComponentUnavailableException: WFLYEJB0467: The request was rejected as the container is suspended
我們正在嘗試在Wildfly-17服務器中部署EAR(EJB3組件和Web模塊)。 借助於Spring依賴注入,將EJB3組件注入到控制器中。 在服務器啟動期間,我收到EJBComponentUnavailableException。 如果部署EJB3並刪除Web模塊Spring依賴項 ...
[英]No suitable driver found for {mysql.url} driver already declared in jpa
我已經在jpa類中聲明了我的驅動程序,並在mysql中聲明了連接器的依賴性,並在我的數據庫中聲明了定義模式。 但是在進行戰爭時,會在日志中顯示消息,驅動程序已加載,但在api類中卻顯示找不到適用於{MySql}的驅動程序 根WebApplicationContext:開始初始化刷新根 ...
[英]Spring MVC 4 static resources not loading to Thymeleaf
我正在嘗試將靜態資源加載到thymeleaf html文件中。 但是資源沒有加載。有人知道我在這里做錯什么嗎? 我在這里使用Spring Java Config。 這是我的Config類 這是我的HTML頁面。 這就是我的文件夾結構用於需要加載的靜態資源的方式。 ...
[英]SEVERE: Async timeout for GET [ Streaming huge data Using Spring MVC 4.3.x, Java 8, Tomcat 7 ]
我使用的是Spring MVC 4.3.9.RELEASE, Java 8, Tomcat 7 我的代碼如下, 我收到如下錯誤, 題: 我錯過了什么? 如何讓我的異步請求不超時並等到 outputStream 正常關閉? ...
[英]DI injecting a String bean as single element of a List<String> instead of the proper List<String> bean
我是第一次學習Spring Framework和DI,並嘗試使用Spring-boot 1.2.0(由於Spring Framework版本要求為4.1.x,因此項目受到限制)的測試應用程序,我制作了一個BookBean,它具有兩個屬性:字符串標題和作者列表。 顯然,DI是將標題作為列表的唯一 ...
[英]How hide exception while bean initializing
我正在創建一些Spring服務類。 一種方法返回 在靜態上下文中加載一些資源包,特別是對於當前語言環境,但在源代碼中沒有俄語語言環境,我不打算添加它們,因為它們在項目中沒用。 我想處理這個類創建並隱藏異常 我試圖編寫自定義bean后處理器(因為調試器說它發生在這個階段),但i ...
[英]Difficulties In Migration from Spring 4 to Spring 5
計划將 Spring 4 項目遷移到 Spring 5。 我瀏覽了 spring 5 的特性,它有一些有趣的特性,比如 Webflux 、反應式編程……這可能會提高我的應用程序的性能。 我不確定遷移會有多困難。 Reg 項目復雜性: 1) 更復雜的項目,其中公開和使用了更多的 API。 2 ...
[英]**java.lang.OutOfMemoryError: Java heap space with Spring 4, Hibernate 4, My Sql connector 8.1 and tomcat 8.5** when using **My SQL 5.7.23*
這是例外詳細信息:- odProxy.invoke(MethodProxy.java:204) 這是我正在獲取異常的Hibernate查詢:- **注意:-**當我將My SQL 5.1與相同的數據一起使用時,相同的查詢效果很好。 當我使用My SQL 5.7.23 RDS ...
[英]Spring 4 AOP : Getting exception java.lang.IllegalArgumentException: error at ::0 formal unbound in pointcut
我正在嘗試使用Spring Advice參數運行Spring AOP演示程序。 執行以下代碼時,出現異常“ java.lang.IllegalArgumentException:在切入點:: 0正式未綁定時出錯”。 請幫助我了解以下代碼有什么問題。 Performance.java ...
[英]Need xml bean's java representation in Spring4
我如何在Java中表示以下代碼段,我的項目正在使用Spring4,我需要將其轉換。 任何幫助將非常感激。 提前致謝! ...
[英]Make websocket (sockjs) work with spring4 running at GlassFish 3.1.2.2
我嘗試在GlassFish 3.1.2.2的客戶端上使用sockjs並在后端使用spring4(使用java config)創建websocket連接,但是無論如何我都會失敗,並出現以下問題: java.lang.IllegalArgumentException:必須在Servlet上 ...
[英]Spring4 Jersey2 integration: Adding jersey-spring4 fails
我正在嘗試將 Spring 4 與 Jersey 2 集成。 但是,拋出此異常並且在 Glassfish 4.1.1 上部署失敗: java.lang.AbstractMethodError: org.glassfish.jersey.server.spring.SpringCompone ...