Spring
Ollama文档
Grok文档
OpenAI文档
Pytorch文档
Anaconda文档
Redis文档
CursorAI文档
markdown教程
LangChain开发文档
全部版本
切换语言
中文 English
所有文档
  • 最新文档
  • Spring AI Spring Boot Spring Framework Spring Cloud Spring Cloud Data Flow Spring Data Spring Integration Spring Batch Spring Security 全部项目
  • 开发工具(英文)
  • Spring.io Spring Tools 4 Spring Initializr
    Spring Shell 3.4.1
      • Overview
      • Getting Started
      • Upgrading
      • Basics
        • Reading Docs
      • Commands
        • Registration
        • Programmatic
        • Annotation
        • Legacy Annotation
        • Organizing Commands
        • Command Availability
        • Exception Handling
          • Exception Resolving
          • Exit Code Mappings
          • @ExceptionResolver
        • Alias
        • Hidden Command
        • Help Options
        • Interaction Mode
        • Built-In Commands
          • Help
          • Clear
          • Exit
          • Stacktrace
          • Script
          • History
          • Completion
          • Version
        • Writing
      • Options
        • Basics
          • Programmatic
          • Annotation
          • Legacy Annotation
        • Short Format
        • Arity
        • Positional
        • Optional Value
        • Default Value
        • Validation
        • Label
        • Types
        • Naming
      • Completion
      • Building
      • Components
        • Flow
        • Flow Components
          • Component Render
          • String Input
          • Path Input
          • Path Search
          • Confirmation
          • Single Select
          • Multi Select
      • Terminal UI
        • Introduction
          • TerminalUI
        • Views
          • AppView
          • BoxView
          • ButtonView
          • DialogView
          • GridView
          • InputView
          • ListView
          • MenuView
          • MenuBarView
          • ProgressView
          • StatusBarView
        • Events
          • EventLoop
          • Key Handling
          • Mouse Handling
      • Customization
        • Theming
        • Logging
        • Command Not Found
        • Single Command
        • Context Close
      • Execution
      • Testing
        • Basics
        • Settings
      • Appendices
        • Technical Introduction
          • Command Registration
          • Command Parser
          • Command Execution
          • Shell Context
          • Command Context
          • Command Catalog
          • Theming
          • Search Algorithms
        • Debugging
        • Terminal UI
          • View Development
          • Catalog App
      • Javadoc
    GitHub Project

    Annotation

    Option annotation can be used to define an option name if you don’t want it to be same as argument name.spring-doc.cn

    @Command
    public String example(@Option(longNames = "arg") String arg1) {
    	return "Hello " + arg1;
    }
    • Spring Shell
    • Options
    • Basics
    • Annotation

    Programmatic Legacy Annotation
    Spring

    本站点文档内容均由 Spring官网 翻译而来,翻译内容可能存在遗漏或偏差,仅供个人学习,准确内容请以 Spring官网英文文档 为准。
    Copyright © 2005 - 2025 南京筱麦软件有限公司 ( 苏ICP备2022047690号-3 | 苏公网安备32011402011833 )