草庐IT

my-component

全部标签

java - org.codehaus.plexus.component.repository.exception.ComponentLookupException : java. util.NoSuchElementException

我尝试测试我的Maven插件并收到奇怪的异常。发现类似问题here,但答案没有帮助。pom.xmlorg.apache.mavenmaven-plugin-api3.3.9org.apache.mavenmaven-project3.0-alpha-2com.jcabijcabi-aether0.10.1org.apache.maven.plugin-toolsmaven-plugin-annotations3.4providedorg.apache.maven.plugin-testingmaven-plugin-testing-harness3.3.0testorg.apache.

java - 启动 Neo4j 失败 : Component was successfully initialized, 但未能启动

我正在学习Pluralsight上的Neo4J教程,我必须使用drwho(神秘博士)示例数据库。我正在使用Neo4j社区版3.0.1版。但是示例数据库(drwho)是由旧版本制作的,我必须将dbms.allow_format_migration属性设置为"true"。这样做之后,当我尝试启动服务器时,它弹出了这个错误StartingNeo4jfailed:Component'org.neo4j.server.database.LifecycleManagingDatabase@673b0b17'wassuccessfullyinitialized,butfailedtostart.Pl

java - @Component 和@Repository/@Service 注解的处理方式有什么区别?

我今天在使用Spring3.0时偶然发现了一个相当奇怪的问题:有一个抽象类A及其具体实现A_Impl.A_Impl注释为@Repository并由Spring自动扫描(和都在上下文中声明)。A和A_Impl部署在单独的JAR中(不确定这是否重要)。一切正常。现在,我正在审查该代码和@Repository在语义上似乎不太合适(所讨论的类与持久性无关)所以-以我无限的智慧-我决定将其更改为更通用的@Component.不用说,一切都爆炸了,让我看起来像个彻头彻尾的白痴。错误(在Spring上下文初始化期间发生)是Spring的ClassPathResource.getInputStream

java - Spring @Component 类必须是公开的吗?

我想将组件的接口(interface)公开为接口(interface),实现类将受到包保护(可能在其他包中):packagebaz.ifaceinterfaceFoo{voidbar();}packagebaz.whatever@ComponentclassSpringyFooimplementsbaz.iface.Foo{publicvoidbar(){frobnicate();}}假设baz.whatever在component-scan中,Spring是否能够在其他地方Autowiringbaz.iface.Foo?classFooClient{@Autowiredprivate

java - 同一个类上注解Entity和Component是不是错了

将来自spring@Component和JPA@Entity的注释放在同一个类上是错误的想法吗?为什么需要它是在JSF页面上使用这个类,它还描述了表结构。原因是为了避免将实体对象映射到将成为表示层的某个值对象。这是一些反模式吗?你有更好的解决方案吗? 最佳答案 Isitwrongideatoputannotationfromspring@ComponentandJPA@Entityonthesameclass.这是Controller和模型的紧耦合。WhyItisneededistousethisclassonJSFpageanda

java - Spring 3 注释配置选择@Configuration 和@Component 但不是@Controller

因此,我尝试在没有XML的情况下配置我的网络应用程序,并采用所有带注释的路线。我有几个用@Configuration和@Component注释的类,它们会自动获取,但由于某些原因,我的@Controller注释没有被识别并映射到它们相应的@RequestMapping值。我的web.xml文件如下所示:timbuk2-webapp-Compositorlog4jConfigLocation/WEB-INF/conf/log4j-config.xmlcontextClassorg.springframework.web.context.support.AnnotationConfigWe

java - JSF 2.0 : Why my ViewScope Beans is re-created even though still on same View

这个问题在这里已经有了答案:@ViewScopedcalls@PostConstructoneverypostbackrequest(1个回答)关闭6年前。在我的.xhtml页面中,我有以下形式:......CustomerTemplate.xhtml是:...//importcss,jsfiles...//Otherthingsonthepage...这是我的ManagedBean:@ManagedBean@ViewScopedpublicclassMrBean{...privateListitems;...@PostConstructpublicvoidprepareItemLis

java - 是否可以将使用 @Component 定义的 bean 作为 BeanFactoryPostProcessor 的参数注入(inject)?

如果需要,需要哪种配置?这是不推荐的吗?带注释的类:packagecom.springbug.beanfactorydependencyissue;importjavax.annotation.Resource;importorg.springframework.stereotype.Component;@ComponentpublicclassDependantBean{@ResourceDependencyBeandependencyBean;//Isn'tinitializedcorrectlypublicDependencyBeangetDependencyBean(){ret

java - jsf- "Cannot find component with expression"

这个问题在这里已经有了答案:HowtofindoutclientIDofcomponentforajaxupdate/render?Cannotfindcomponentwithexpression"foo"referencedfrom"bar"(6个答案)关闭8年前。我正在使用PrimeFaces和一个组件layoutUnit必须更新另一个layoutUnit中的另一个组件:错误信息是:Causedby:javax.faces.FacesException:Cannotfindcomponentwithexpression"formWest:execucao"referencedfr

【Python】成功解决AttributeError: ‘MyClass‘ object has no attribute ‘my_attribute‘

【Python】成功解决AttributeError:‘MyClass’objecthasnoattribute‘my_attribute’🌈个人主页:高斯小哥🔥高质量专栏:Matplotlib之旅:零基础精通数据可视化、Python基础【高质量合集】、PyTorch零基础入门教程👈希望得到您的订阅和支持~💡创作高质量博文(平均质量分92+),分享更多关于深度学习、PyTorch、Python领域的优质内容!(希望得到您的关注~)🌵文章目录🌵🐍一、什么是AttributeError?🔍二、如何解决AttributeError?方法1:检查拼写和大小写方法2:检查对象类型方法3:确保对象已初始化