File tree Expand file tree Collapse file tree
src/main/java/io/github/randomcodespace/iq Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ package io .github .randomcodespace .iq .config ;
2+
3+ import com .fasterxml .jackson .databind .ObjectMapper ;
4+ import com .fasterxml .jackson .databind .SerializationFeature ;
5+ import org .springframework .boot .autoconfigure .condition .ConditionalOnMissingBean ;
6+ import org .springframework .context .annotation .Bean ;
7+ import org .springframework .context .annotation .Configuration ;
8+
9+ /**
10+ * Provides an ObjectMapper bean when Spring Boot's web auto-configuration
11+ * is not active (e.g., indexing profile with WebApplicationType.NONE).
12+ */
13+ @ Configuration
14+ public class JacksonConfig {
15+
16+ @ Bean
17+ @ ConditionalOnMissingBean (ObjectMapper .class )
18+ public ObjectMapper objectMapper () {
19+ return new ObjectMapper ()
20+ .disable (SerializationFeature .FAIL_ON_EMPTY_BEANS );
21+ }
22+ }
Original file line number Diff line number Diff line change 88import io .github .randomcodespace .iq .query .QueryService ;
99import org .springframework .ai .tool .annotation .Tool ;
1010import org .springframework .ai .tool .annotation .ToolParam ;
11+ import org .springframework .context .annotation .Profile ;
1112import org .springframework .stereotype .Component ;
1213
1314import java .nio .file .Path ;
2021 * Tool names match the Python MCP implementation exactly.
2122 */
2223@ Component
24+ @ Profile ("serving" )
2325public class McpTools {
2426
2527 private final QueryService queryService ;
You can’t perform that action at this time.
0 commit comments