我有一个AppComponent包含的列表ShapeComponents。我实现了一些部件延伸的ShapeComponent喜欢LineComponent,CircleComponent,RectangleComponent。他们每个人都有自己ng-template的#shapeTemplate。在我的app.component.html我要遍历列表ShapeComponents并显示每个ng-template(从LineComponent,CircleComponent等等)。
所以我有
shapes: ShapeComponent[] = []
Run Code Online (Sandbox Code Playgroud)
其中包含LineComponent,CircleComponent等
我想要这样的事情
<div *ngFor="let shape of shapes">
<!-- How to display the ng-template from for example LineComponent or Circle -->
</div>
Run Code Online (Sandbox Code Playgroud)
我认为使用@ViewChildren或@ContentChildren会很有用,但不知道如何处理
我有使用artifactory和jenkins的问题.请参阅下面的错误日志.
我的版本詹金斯:1.638我的神器版本:3.9.2
Artifactory工作正常,还在jenkins中安装了插件并进行了配置.所有似乎都工作正常,但当我想建立一个项目时,我有以下错误.
ERROR: Processing failed due to a bug in the code.
Please report this to jenkinsci-users@googlegroups.com
**java.lang.RuntimeException: java.lang.NullPointerException
at org.jfrog.hudson.maven3.extractor.MavenExtractorEnvironment.buildEnvVars(MavenExtractorEnvironment.java:136)**
at hudson.model.AbstractBuild.getEnvironment(AbstractBuild.java:947)
at hudson.maven.AbstractMavenBuild.getEnvironment(AbstractMavenBuild.java:56)
at hudson.maven.MavenModuleSetBuild.getEnvironment(MavenModuleSetBuild.java:165)
at hudson.maven.MavenModuleSetBuild$MavenModuleSetBuildExecution.doRun(MavenModuleSetBuild.java:620)
at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:534)
at hudson.model.Run.execute(Run.java:1738)
at hudson.maven.MavenModuleSetBuild.run(MavenModuleSetBuild.java:529)
at hudson.model.ResourceController.execute(ResourceController.java:98)
at hudson.model.Executor.run(Executor.java:410)
Caused by: java.lang.NullPointerException
at org.jfrog.hudson.util.ExtractorUtils.addBuilderInfoArguments(ExtractorUtils.java:157)
at org.jfrog.hudson.maven3.extractor.MavenExtractorEnvironment.buildEnvVars(MavenExtractorEnvironment.java:132)
... 9 more
project=hudson.maven.MavenModuleSet@d90cf1[messenger]
project.getModules()=[hudson.maven.MavenModule@3993ad[messenger/com.jdb.software:messenger][messenger/com.jdb.software:messenger][relativePath:]]
project.getRootModule()=hudson.maven.MavenModule@3993ad[messenger/com.jdb.software:messenger][messenger/com.jdb.software:messenger][relativePath:]
FATAL: java.lang.NullPointerException
Run Code Online (Sandbox Code Playgroud) 我创建了一个 Hazelcast 管理器,它使用 spring、hibernate、jpa。我可以启动我的 hazelcast 实例。
我遇到的问题是我不知道如何使用 spring config 配置 hazelcast 客户端。我想在其他一些服务器组件中使用一个hazelcast-client
我真的不知道如何开始
任何帮助,将不胜感激
下面是我的 Hazelcast 服务器的 spring 配置
约翰
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:hz="http://www.hazelcast.com/schema/spring"
xmlns:tx="http://www.springframework.org/schema/tx"
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
http://www.springframework.org/schema/tx
http://www.springframework.org/schema/tx/spring-tx.xsd
http://www.hazelcast.com/schema/spring
http://www.hazelcast.com/schema/spring/hazelcast-spring.xsd">
<bean id="propertyConfigurer" class="org.springframework.beans.factory.config.PropertyPlaceholderConfigurer">
<property name="locations">
<list>
<value>file:${ecs.config.path}/ecs.properties</value>
<value>classpath*:config/ecs.properties</value>
</list>
</property>
<property name="ignoreUnresolvablePlaceholders" value="true"/>
<property name="ignoreResourceNotFound" value="true" />
</bean>
<context:component-scan base-package="nl.ict.psa.ecs.hazelcast.dao,nl.ict.psa.ecs.hazelcast.mapstores,nl.ict.psa.ecs.hazelcast.service" />
<bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
<property name="driverClassName" value="${datasource.driverClassName}" />
<property name="url" value="${datasource.url}" />
<property name="username" value="${datasource.username}"/>
<property name="password" value="${datasource.password}"/>
</bean>
<bean id="hazelcast" class="com.hazelcast.core.Hazelcast"/>
<bean …Run Code Online (Sandbox Code Playgroud)