spring中需要手动设置authenticationManager吗?
加载 ApplicationContext 后,我收到如下警告: _ INFO:未设置身份验证管理器。更改密码时不会对用户进行重新验证。 _ 我的 Context.XML 文件是…
Spring 3 jar配置(自动配置)
我正在寻找某种有关 Spring jar 配置的“最佳实践”信息。我有一个网络项目(war),我需要连接一些 jar 库 - 我的 jar 包含附加功能。这些 jar 包含 …
如何更改 ContextLoaderListener 的应用程序上下文路径
在我的应用程序中,默认情况下 org.springframework.web.context.ContextLoaderListener 在 WEB-INF 文件夹中查找 Applicationcontext.xml 。现在我想…
组件扫描在 Tomcat web 应用程序的 JAR 中找不到 @Component
我刚刚在 Spring 错误系统中提交了一个错误 ( https://jira.springsource.org/browse/SPR -8551 ),但我仍然不确定我是否遗漏了一些 我用 追踪到此语…
Spring MVC 2.5 混合使用注释和注释XML 配置,但 xml 被忽略
在我的 Spring MVC Web 应用程序中,我想将基于 xml 的配置与注释混合在一起: 我使用 @Controller、@RequestMapping("bla.htm")、@RequestParam 等注…
从 Jar 中加载上下文
我需要一些澄清;我有一个我构建的 jar,并且在 jar 内部有一个我需要加载的自定义 application-context.xml 文件。我将文件加载到 jar 内的类中。当…
Spring ApplicationListener 未接收事件
我有以下 ApplicationListener: package org.mycompany.listeners; import org.springframework.context.ApplicationListener; import org.springfra…
Bean 使用 @Controller 初始化,但 @RequestMapping 不会被调用
下面是我对新的基于 Spring 3 注解的控制器的设置: //dispatcher-servlet.xml //web.xml
如何注入ApplicationContext本身
我想将 ApplicationContext 本身注入到一个 bean 中。 类似 public void setApplicationContext(ApplicationContect context) { this.context = conte…
用spring进行多线程Context初始化?
我有一个带有 spring 的传统三层应用程序。我的存储库之一需要 >初始化需要 3 分钟,所以我考虑了一些多线程方法来加速整个过程 - 我认为依赖树中的大…
如何在 Eclipse 中更改动态 Web 项目的上下文根?
我在 Eclipse 中开发了一个动态 Web 项目。 我可以使用以下 URL 通过浏览器访问该应用程序: http://localhost:8080/MyDynamicWebApp 我想将访问 URL …
如何在使用@RunWith和@ContextConfiguration注释的jUnit测试中访问Spring上下文?
我有以下测试类 @RunWith(SpringJUnit4ClassRunner.class) @ContextConfiguration(locations = {"/services-test-config.xml"}) public class MySeric…
Spring 3 Java Config:导入的@Configuration未增强?
我有一个应用程序,我试图将最新的 Spring 3 约定与基于注释的配置结合使用,但我也有使用构造函数注入的遗留类。根据 Spring 文档,您应该只调用创建…
在 Web 应用程序中运行时动态加载 Spring 上下文
我正在将使用 Spring Framework 的标准 Java 应用程序转换为 Web 应用程序。此应用程序根据运行时参数加载新的 Spring Context,这是使用 ClassPathXm…