Java 目录中的Hippo CMS组件(Spring托管)(如何使用Spring托管目录组件)
我在Hippo CMS中设置Spring和目录时遇到问题 我用componentclassname:ServiceLinkListComponent配置了一个目录,这样我就可以将组件拖放到通道管理器页面上的占位符中 在遵循上的示例之后,我添加了Spring支持,因此我必须将componentclassname更改为componentclassname:SpringBridgeHstComponent 不幸的是,我无法再将任何文档链接到该组件,因为@ParametersInfo无法识别,因为它位于SpringBridgeHstComponent的bean中 如何使用spring托管目录组件 组件类 服务等级 参考资料/META-INF.hst-assembly.overrides中的applicationContext.xml 回购Java 目录中的Hippo CMS组件(Spring托管)(如何使用Spring托管目录组件),java,spring,hippocms,Java,Spring,Hippocms,我在Hippo CMS中设置Spring和目录时遇到问题 我用componentclassname:ServiceLinkListComponent配置了一个目录,这样我就可以将组件拖放到通道管理器页面上的占位符中 在遵循上的示例之后,我添加了Spring支持,因此我必须将componentclassname更改为componentclassname:SpringBridgeHstComponent 不幸的是,我无法再将任何文档链接到该组件,因为@ParametersInfo无法识别,因为它位于
我找到了一个做我想做的事情的方法,但我认为这是一个肮脏的工作。也许一些来自希波克姆斯的人能帮上忙 我创建了另一个类:
@ParametersInfo(type = ServiceLinkListComponentInfo.class)
public class ServiceLinkListSpringHstComponent extends SpringBridgeHstComponent {}
此类需要在目录中设置,而不是在SpringBridgeHstComponent中设置。我还尝试了一个嵌套类来删除第二个文件,但hippo没有找到它。我是bridge类的原始作者。我认为您已经找到了当前的限制和合理的解决方法- 我同意这种解决方案并不理想,因为您需要添加尽可能多的SpringBridgeHstComponent子类作为组件配置 你能在这里提交一张JIRA票来进口这个吗? - 顺便说一句,我最初认为这只能在桥接类级别上进行改进,但它似乎需要在容器级别上进行改进,尤其是在目标相关模块方面。因此,需要对该模块进行更多的研究
@Component("testService")
public class TestService {
public String test(){
return "hello";
}
}
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans.xsd
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context.xsd">
<context:component-scan base-package="com.xxx.yyy" />
</beans>
@ParametersInfo(type = ServiceLinkListComponentInfo.class)
public class ServiceLinkListSpringHstComponent extends SpringBridgeHstComponent {}