Fuse 6 is no longer supported
As of February 2025, Red Hat Fuse 6 is no longer supported. If you are using Fuse 6, please upgrade to Red Hat build of Apache Camel.このコンテンツは選択した言語では利用できません。
11.3. Bootstrapping a Spring Context in a WAR
Overview リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
You can bootstrap a Spring context in a WAR using Spring's ContextLoaderListener class.
Bootstrapping a Spring context in a WAR リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
For example, the following
web.xml
file shows how to boot up a Spring application context that is initialized by the XML file, /WEB-INF/applicationContext.xml
(which is the location of the context file in the generated WAR package):
Maven dependency リンクのコピーリンクがクリップボードにコピーされました!
リンクのコピーリンクがクリップボードにコピーされました!
In order to access the
ContextLoaderListener
class from the Spring framework, you must add the following dependency to your project's pom.xml
file:
<dependency> <groupId>org.springframework</groupId> <artifactId>spring-web</artifactId> <version>${spring-version}</version> </dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
<version>${spring-version}</version>
</dependency>
Where the
spring-version
property specifies the version of the Spring framework you are using.