spring beans

This commit is contained in:
Michele Artini 2023-09-27 11:20:49 +02:00
parent d2998b4a8a
commit ab3964043d
2 changed files with 7 additions and 9 deletions

View File

@ -38,15 +38,13 @@ public class WfExecutorApplication extends AbstractDnetApp {
}
@Bean
public XsltTransformFactory xsltTransformFactory() {
return new XsltTransformFactory(dnetServiceClientFactory().getClient(SimpleResourceClient.class),
public XsltTransformFactory xsltTransformFactory(final DnetServiceClientFactory clientFactory) {
return new XsltTransformFactory(clientFactory.getClient(SimpleResourceClient.class),
xsltFunctions != null ? xsltFunctions : new ArrayList<>());
}
@Bean
public CleanerFactory cleanerFactory() {
final DnetServiceClientFactory clientFactory = dnetServiceClientFactory();
public CleanerFactory cleanerFactory(final DnetServiceClientFactory clientFactory) {
return new CleanerFactory(clientFactory.getClient(SimpleResourceClient.class), clientFactory.getClient(VocabularyClient.class));
}

View File

@ -38,14 +38,14 @@ public class WfManagerApplication extends AbstractDnetApp {
}
@Bean
public XsltTransformFactory xsltTransformFactory() {
return new XsltTransformFactory(dnetServiceClientFactory().getClient(SimpleResourceClient.class),
public XsltTransformFactory xsltTransformFactory(final DnetServiceClientFactory clientFactory) {
return new XsltTransformFactory(clientFactory.getClient(SimpleResourceClient.class),
xsltFunctions != null ? xsltFunctions : new ArrayList<>());
}
@Bean
public CleanerFactory cleanerFactory() {
final DnetServiceClientFactory clientFactory = dnetServiceClientFactory();
public CleanerFactory cleanerFactory(final DnetServiceClientFactory clientFactory) {
return new CleanerFactory(clientFactory.getClient(SimpleResourceClient.class), clientFactory.getClient(VocabularyClient.class));
}
}