GH-406 - Ignore Spring AOT generated types in architecture model.
We now explicitly exclude classes generated by Spring AOT in the architectural model. For technical reasons, they might introduce dependencies to application components considered module internals otherwise. Also, proxies generated do not need to be considered either.
This commit is contained in:
@@ -30,6 +30,8 @@ import java.util.stream.Stream;
|
||||
import org.junit.jupiter.api.Test;
|
||||
|
||||
import com.acme.myproject.Application;
|
||||
import com.acme.myproject.aot.Some$$SpringCGLIB$$Proxy;
|
||||
import com.acme.myproject.aot.Spring__Aot;
|
||||
import com.acme.myproject.complex.internal.FirstTypeBasedPort;
|
||||
import com.acme.myproject.complex.internal.SecondTypeBasePort;
|
||||
import com.acme.myproject.moduleA.ServiceComponentA;
|
||||
@@ -185,6 +187,15 @@ class ApplicationModulesIntegrationTest {
|
||||
assertThat(third.getDeclaredDependencies(modules).isAllowedDependency(Fourth.class)).isTrue();
|
||||
}
|
||||
|
||||
@Test // GH-406
|
||||
void excludesSpringAOTGeneratedTypes() {
|
||||
|
||||
assertThat(modules.getModuleByName("aot")).hasValueSatisfying(it -> {
|
||||
assertThat(it.contains(Spring__Aot.class)).isFalse();
|
||||
assertThat(it.contains(Some$$SpringCGLIB$$Proxy.class)).isFalse();
|
||||
});
|
||||
}
|
||||
|
||||
private static void verifyNamedInterfaces(NamedInterfaces interfaces, String name, Class<?>... types) {
|
||||
|
||||
Stream.of(types).forEach(type -> {
|
||||
|
||||
Reference in New Issue
Block a user