Annotation Interface McpServerApplication


@Target(TYPE) @Retention(RUNTIME) public @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.
    The base package class for component scanning.
  • 元素详细资料

    • basePackage

      String basePackage
      The base package for component scanning. Defaults to the package of the annotated class.
      返回:
      the base package for component scanning
      默认值:
      ""
    • basePackageClass

      Class<?> basePackageClass
      The base package class for component scanning. Defaults to Object.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