如何将Springframework与osgi

时间:2018-01-30 09:40:16

标签: java spring osgi osgi-bundle

我正在尝试使用带有osgi的springframework,我已经导入了依赖关系,如:

<dependency>
    <groupId>org.springframework</groupId>
    <artifactId>spring-web</artifactId>
    <version>3.0.2.RELEASE</version>
</dependency> 

另外,我已经为此配置了插件:

<plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <version>2.2.0</version>
                <extensions>true</extensions>
                <configuration>
                    <instructions>
                        <Export-Package>org.spring*</Export-Package>
                    </instructions>
                </configuration>
            </plugin>

但是,当我开始我的felix时,我得到以下例外:

org.osgi.framework.BundleException: Unable to resolve com.org.it.processing.serviceintegration [3](R 3.0):
 missing requirement [com.org.it.processing.serviceintegration [3](R 3.0)] osgi.wiring.package; 
 (&(osgi.wiring.package=org.springframework.http)(version>=3.0.0)(!(version>=4.0.0))) 
 Unresolved requirements: [[com.org.it.processing.serviceintegration [3](R 3.0)] osgi.wiring.package; 
 (&(osgi.wiring.package=org.springframework.http)(version>=3.0.0)(!(version>=4.0.0)))]
    at org.apache.felix.framework.Felix.resolveBundleRevision(Felix.java:4111)
    at org.apache.felix.framework.Felix.startBundle(Felix.java:2117)
    at org.apache.felix.framework.Felix.setActiveStartLevel(Felix.java:1371)
    at org.apache.felix.framework.FrameworkStartLevelImpl.run(FrameworkStartLevelImpl.java:308)
    at java.lang.Thread.run(Thread.java:745)
[Device Manager] info: Passive start

请帮帮我。

0 个答案:

没有答案