GH-187 - Do not include non-exposed Spring beans that implement interfaces in Application Module Canvas by default.

We now properly check whether one of a Spring bean's implemented interfaces is exposed by the module before including it in the default rendering of the Application Module Canvas.
This commit is contained in:
Oliver Drotbohm
2023-04-30 14:18:36 +02:00
parent 0b6dccf334
commit 4656f82089
5 changed files with 106 additions and 4 deletions

View File

@@ -77,12 +77,12 @@ public class SpringBean {
/**
* Returns whether the bean is considered to be an API bean, which means it is either a public type exposed in an API
* package of the module or implements a public API interface.
*
* @return
* package of the module or implements an exposed API interface.
*/
public boolean isApiBean() {
return module.isExposed(type) || !getInterfacesWithinModule().isEmpty();
return module.isExposed(type)
|| getInterfacesWithinModule().stream().anyMatch(module::isExposed);
}
/**