English 中文(简体)
Spring JMS 投射导致申请不启动
原标题:Spring JMS injection causing application not to startup

我们有一份春季申请,公布并听取远程应用服务器的询问。 我的出版商和听众在自己的应用服务器中以听众为基础。

对我们试验环境而言,我们面临的问题之一是另一个问题。 当我们的测试应用开始时,服务器就没有上台,它试图将JmsTemplate with its linkionFactory,因为它不是有效的联系,而且我们的全部应用都未能负荷。 这给我们集团中与日本宇宙开发公司毫无关系的其他人带来了悲痛。 他们想要做的是操作和测试其代码,但JmsTemplate链接。 工厂倒塌。

Does anyone have any suggestion for enabling spring ignore some bad injections which will allow our application to start properly? Thanks

问题回答

I believe this could be achieved by defining separate spring profiles and then passing it as a parameter in your test environments while starting your application. You could mock or ignore any beans then. Example

import org.springframework.context.annotation.Profile;
@Profile("test")
public class AppConfigTest {

....
....
}

JVM param/ System property

-Dspring.profiles.active=test




相关问题
array dependency injection in spring?

is there a way to use dependency injection to inject all available implementations of a specific interface in spring? This is kind of the same thing as asked here for .NET. Though my aim is to use @...

Spring Properties File

Hi have this j2ee web application developed using spring framework. I have a problem with rendering mnessages in nihongo characters from the properties file. I tried converting the file to ascii using ...

Grails Packaging and Naming Conventions

Packaging Controllers, Services,etc. i.e. - com.company.controllers - com.company.services Is this a good practice or should be avoided by all means?? Another worth mentioning problem I encountered ...

How can I determine Objects in application context?

I am trying to write a portlet for Liferay (using Tomcat and Spring) and need to use a database via Persistence API/Hibernate. I am using some configuration XMLs (applicationContext.xml, etc.) and ...

How to prevent JPA from rolling back transaction?

Methods invoked: 1. Struts Action 2. Service class method (annotated by @Transactional) 3. Xfire webservice call Everything including struts (DelegatingActionProxy) and transactions is configured ...

热门标签