mirror of
https://github.com/kochetkov-ma/allure-server.git
synced 2024-11-24 08:22:37 +02:00
fix: #90 Error creating bean with name 'allureServerPlugins' defined in class path resource [ru/iopump/qa/allure/config/SpringConfiguration.class]
This commit is contained in:
parent
be46cfb7f0
commit
d725aab346
@ -7,6 +7,7 @@ import ru.iopump.qa.allure.helper.plugin.AllureServerPlugin;
|
||||
import ru.iopump.qa.util.ReflectionUtil;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
|
||||
@Slf4j
|
||||
@Configuration
|
||||
@ -14,9 +15,14 @@ public class SpringConfiguration {
|
||||
|
||||
@Bean
|
||||
public Collection<AllureServerPlugin> allureServerPlugins() {
|
||||
var plugins = ReflectionUtil.createImplementations(AllureServerPlugin.class, null);
|
||||
log.info("[ALLURE SERVER CONFIGURATION] Allure server plugins loaded: {}", plugins.stream().map(SpringConfiguration::name).toList());
|
||||
return plugins;
|
||||
try {
|
||||
var plugins = ReflectionUtil.createImplementations(AllureServerPlugin.class, null);
|
||||
log.info("[ALLURE SERVER CONFIGURATION] Allure server plugins loaded: {}", plugins.stream().map(SpringConfiguration::name).toList());
|
||||
return plugins;
|
||||
} catch (Throwable throwable) {
|
||||
log.error("Failed to load allure server plugins. No plugins will be applied", throwable);
|
||||
return Collections.emptyList();
|
||||
}
|
||||
}
|
||||
|
||||
private static String name(AllureServerPlugin plugin) {
|
||||
|
Loading…
Reference in New Issue
Block a user