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...
}
- 作者:
- codeboyzhou
- 另请参阅:
-
可选元素概要
可选元素修饰符和类型可选元素说明The base package for component scanning.Class<?>The base package class for component scanning.
-
元素详细资料
-
basePackage
String basePackageThe base package for component scanning. Defaults to the package of the annotated class.- 返回:
- the base package for component scanning
- 默认值:
- ""
-
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.- 返回:
- the base package class for component scanning
- 默认值:
- java.lang.Object.class
-