org.springframework无法在karaf中解析

zz10

将jar部署在karaf中之后,下面的错误显示出来,并且该捆绑包无法启动。

Exported Packages   org.apache.karaf.examples.command,version=1.0.0
Imported Packages   org.apache.karaf.examples.command.api,version=[1.0,2) from org.custom.command.custom-command-api (103)
org.osgi.framework,version=[1.8,2) from org.apache.felix.framework (0)
org.slf4j,version=[1.7,2) from org.ops4j.pax.logging.pax-logging-api (6)
**org.springframework.http -- Cannot be resolved
org.springframework.util -- Cannot be resolved
org.springframework.web.client -- Cannot be resolved**

在spring-web中添加了必需的依赖项。请参考以下代码段

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

从错误中我可以看到大部分时间它在导入包中失败,而我在导入包标记中没有任何要指定的内容。

<Import-Package>
                            *
                        </Import-Package>

任何帮助都由衷地感谢!

dj

除非您将它们安装为功能部件,否则Karaf将不会具有Spring库。

登录您的karaf,然后尝试:

features:install spring-web

本文收集自互联网,转载请注明来源。

如有侵权,请联系 [email protected] 删除。

编辑于
0

我来说两句

0 条评论
登录 后参与评论

相关文章

无法使用JAXB org.springframework.oxm.UnmarshallingFailureException解析XML消息

导入org.springframework.test.context.junit4.SpringJUnit4ClassRunner无法解析

如何在Spring中处理“ org.springframework.http.converter.HttpMessageNotReadableException:JSON解析错误”?

“导入org.springframework无法解析。”

org.apache软件包无法在Eclipse中解析

导入org.springframework.security无法解析

导入org.springframework.web无法解析。蚀

导入org.springframework.boot.autoconfigure.web.ErrorAttributes无法解析

org.springframework.batch.item.excel.poi.PoiItemReader无法解析

org.springframework.beans.BeanInstantiationException:无法实例化[org.springframework.ui.Model]:指定的类是接口

无法解析org.springframework.beans.BeansException类型。从所需的.class文件间接引用它

导入org.springframework.data无法在gradle中解析

无法解析org.springframework.security.authentication.AuthenticationManager类型。从所需的.class文件间接引用它

“无法解析类型org.springframework.web.WebApplicationInitializer。它是从所需的.class文件中间接引用的”

无法解析org.springframework.context.support.GenericApplicationContext类型

无法读取HTTP消息:org.springframework.http.converter.HttpMessageNotReadableException:JSON解析错误:无法构造实例

如何在Spring MVC中解析org.springframework.web.servlet.view.InternalResourceViewResolver

无法在Gradle中解析类org.gradle.util.TestUtil

Liferay中的异常:org.hibernate.QueryException:无法解析属性

JasperException springframework.org/tags/form无法仅在嵌入式Tomcat中解决

org.springframework.web.multipart.commons.CommonsMultipartFile无法转换为org.springframework.web.multipart.MultipartFile

org.springframework.web.multipart.MultipartException:无法解析多部分servlet请求...流意外结束

设置bean属性'sourceList'时无法解析对bean'org.springframework.security.web.DefaultSecurityFilterChain#0'的引用

无法解析 org.springframework.security.core.GrantedAuthority 即使它已下载/显示在项目库下

import org.springframework.web.bind.annotation.DeleteMapping 无法解析

spring 无法访问列表 multipartfile 中的 org.springframework.core.io.Inputstreamsource

无法在 GCP Shell 中解析导入 org.apache 语句

无法解析 org.springframework.data.repository.Repository 类型。它是从所需的 .class 文件间接引用的

无法满足 STS4 org.springframework.boot.ide.branding.sts4 4.12.0 中的依赖