mirror of
https://gitee.com/mateos/mateclaw.git
synced 2026-09-13 11:13:43 +08:00
Adds a read-only GET /api/v1/settings/search-providers catalog (admin-gated, no secrets), grouped collapsible provider cards, and a schema-driven plugin config form. Breaks a SystemSettingService<->PluginManager circular dependency via parameter @Lazy (with a context smoke test), and fixes PluginManager.updateConfig to merge instead of overwrite so omitted/blank secret fields are preserved. Hardens plugin search-provider id validation (reject-not-trim, case-insensitive conflict) and insulates the provider bridge hot path from throwing plugin code.
26 lines
1.0 KiB
Java
26 lines
1.0 KiB
Java
package vip.mate;
|
|
|
|
import org.junit.jupiter.api.Test;
|
|
import org.springframework.boot.test.context.SpringBootTest;
|
|
|
|
/**
|
|
* Guards against circular bean dependencies and other wiring mistakes that
|
|
* only surface when Spring actually constructs the full application context —
|
|
* invisible to Mockito-based unit tests, which never build the real bean graph.
|
|
* <p>
|
|
* Added after a regression slipped through the unit suite: a circular dependency
|
|
* (SystemSettingService → PluginManager → ToolRegistry → I18nService →
|
|
* SystemSettingService) was introduced and went undetected by the full
|
|
* per-class unit test suite until a manual {@code spring-boot:run} smoke check.
|
|
*/
|
|
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.NONE)
|
|
class ApplicationContextSmokeTest {
|
|
|
|
@Test
|
|
void contextLoads() {
|
|
// Intentionally empty: if the ApplicationContext fails to start
|
|
// (missing bean, circular dependency, bad property, etc.), this
|
|
// test fails during Spring's context setup before the test body runs.
|
|
}
|
|
}
|