fix(print): include Spring DAO exceptions at runtime

This commit is contained in:
2026-08-27 15:21:28 +08:00
parent 0fb51211aa
commit adabec13d3
2 changed files with 7 additions and 0 deletions
@@ -44,6 +44,9 @@ class PrintStatelessArchitectureTest {
@Test
void runtimeClasspathDoesNotBringBackJdbcOrMybatisTransitively() {
ClassLoader loader = getClass().getClassLoader();
assertThat(isPresent("org.springframework.dao.CannotAcquireLockException", loader))
.as("common-web exception handling requires Spring DAO exceptions at runtime")
.isTrue();
assertThat(isPresent("org.springframework.jdbc.core.JdbcTemplate", loader))
.as("Print must exclude the JDBC starter inherited through common-core")
.isFalse();