Annotation Interface McpServerApplication
This annotation is used to mark a class as an MCP (Model Context Protocol) server application.
The base package for component scanning can be specified via the basePackage
attribute. If not specified, the package of the annotated class will be used.
Example usage:
@McpServerApplication(basePackage = "com.example.mcp")
public class MyMcpServerApplication {
// Application logic...
}
- Author:
- codeboyzhou
- See Also:
-
Optional Element Summary
Optional ElementsModifier and TypeOptional ElementDescriptionThe base package for component scanning.Class<?>The base package class for component scanning.
-
Element Details
-
basePackage
String basePackageThe base package for component scanning. Defaults to the package of the annotated class.- Returns:
- the base package for component scanning
- Default:
- ""
-
basePackageClass
Class<?> basePackageClassThe base package class for component scanning. Defaults toObject.class.Note: This attribute is intended to be used when the base package cannot be determined statically. In most cases,
basePackage()should be used instead.- Returns:
- the base package class for component scanning
- Default:
- java.lang.Object.class
-