spring-cloud-function
БесплатноБез исполняемых скриптовНе проверенSpring Cloud Function for serverless and FaaS deployments. Covers function beans, AWS Lambda, Azure Functions, and GCP adapters. USE WHEN: user mentions…
от claude-dev-suite★ 51 звезда на GitHubОб этом скилле
Spring Cloud Function - Quick Reference
Deep Knowledge: Use
mcp__documentation__fetch_docswith technology:spring-cloud-functionfor comprehensive documentation.
Dependencies
<!-- Core -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-starter-function-web</artifactId>
</dependency>
<!-- AWS Lambda adapter -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-adapter-aws</artifactId>
</dependency>
<!-- Azure Functions adapter -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-adapter-azure</artifactId>
</dependency>
<!-- GCP Cloud Functions adapter -->
<dependency>
<groupId>org.springframework.cloud</groupId>
<artifactId>spring-cloud-function-adapter-gcp</artifactId>
</dependency>
Function Types
┌─────────────────────────────────────────────────────────────┐
│ Function Types │
│ │
│ Function<I, O> Input → Processing → Output │
│ Consumer<I> Input → Processing (no output) │
│ Supplier<O> (no input) → Generate Output │
│ │
│ ┌───────┐ ┌──────────┐ ┌────────┐ │
│ │ Input │───▶│ Function │───▶│ Output │ │
│ └───────┘ └──────────┘ └────────┘ │
└─────────────────────────────────────────────────────────────┘
Basic Functions
Function (Input → Output)
@Configuration
public class FunctionConfig {
@Bean
public Function<String, String> uppercase() {
return value -> value.toUpperCase();
}
@Bean
public Function<Person, Greeting> greet() {
return person -> new Greeting("Hello, " + person.getName() + "!");
}
@Bean
public Function<Flux<String>, Flux<String>> reactiveUppercase() {
return flux -> flux.map(String::toUpperCase);
}
}
public record Person(String name, int age) {}
public record Greeting(String message) {}
Consumer (Input → void)
@Bean
public Consumer<Order> processOrder() {
return order -> {
log.info("Processing order: {}", order.getId());
orderService.process(order);
};
}
@Bean
public Consumer<Flux<Event>> eventProcessor() {
return events -> events
.doOnNext(event -> log.info("Received event: {}", event))
.subscribe(eventService::handle);
}
Supplier (void → Output)
@Bean
public Supplier<String> hello() {
return () -> "Hello, World!";
}
@Bean
public Supplier<Flux<Long>> counter() {
return () -> Flux.interval(Duration.ofSeconds(1));
}
@Bean
public Supplier<List<Product>> getProducts() {
return () -> productRepository.findAll();
}
Configuration
application.yml
spring:
cloud:
function:
# Default function to invoke
definition: uppercase
# For multiple functions
# definition: validate|process|notify
# Routing based on header
routing-expression: "headers['function-name']"
# Function-specific config
uppercase:
prefix: "RESULT: "
Function Composition
// Compose functions
@Bean
public Function<String, String> validate() {
return input -> {
if (input == null || input.isEmpty()) {
throw new IllegalArgumentException("Input cannot be empty");
}
return input;
};
}
@Bean
public Function<String, String> sanitize() {
return input -> input.trim().toLowerCase();
}
@Bean
public Function<String, String> process() {
return input -> "Processed: " + input;
}
// Configuration to compose: validate|sanitize|process
// spring.cloud.function.definition=validate|sanitize|process
Programmatic Composition
@Bean
public Function<String, String> composedFunction(
Function<String, String> validate,
Function<String, String> sanitize,
Function<String, String> process) {
return validate.andThen(sanitize).andThen(process);
}
HTTP Endpoints
// Automatic HTTP endpoints when using spring-cloud-starter-function-web
// POST /uppercase → invokes uppercase function
// POST /greet → invokes greet function
// GET /hello → invokes hello supplier
// Example requests:
// curl -X POST localhost:8080/uppercase -d "hello" -H "Content-Type: text/plain"
// curl -X POST localhost:8080/greet -d '{"name":"John"}' -H "Content-Type: application/json"
// curl localhost:8080/hello
AWS Lambda
Handler Configuration
# AWS Lambda handler
spring:
cloud:
function:
definition: processEvent
Lambda Handler Class
public class LambdaHandler extends FunctionInvoker<APIGatewayProxyRequestEvent, APIGatewayProxyResponseEvent> {
}
@Bean
public Function<APIGatewayProxyRequestEvent,
Установить spring-cloud-function в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
ReadGrepGlobWriteEditFAQ
Что делает скилл spring-cloud-function?
Spring Cloud Function for serverless and FaaS deployments. Covers function beans, AWS Lambda, Azure Functions, and GCP adapters. USE WHEN: user mentions "spring cloud function", "serverless Spring", "AWS Lambda Spring", "Azure Functions Spring", "FaaS", "function composition" DO NOT USE FOR: simple REST APIs - use standard controllers, complex workflows - consider Step Functions or similar
Как установить скилл spring-cloud-function?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл spring-cloud-function запускает скрипты?
Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic