Skip to content

Commit

Permalink
Polish sample
Browse files Browse the repository at this point in the history
  • Loading branch information
olegz committed Nov 6, 2023
1 parent 7d4dd30 commit 1753020
Showing 1 changed file with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -20,16 +20,16 @@ public static void main(String[] args) {
SpringApplication.run(NativeUppercaseApplication.class, args);
}

@Bean
public MessageRoutingCallback customRouter() {
return new MessageRoutingCallback() {
@Override
public String routingResult(Message<?> message) {
logger.info("Received message: " + message);
return (String) message.getHeaders().get("spring.cloud.function.definition");
}
};
}
// @Bean
// public MessageRoutingCallback customRouter() {
// return new MessageRoutingCallback() {
// @Override
// public String routingResult(Message<?> message) {
// logger.info("Received message: " + message);
// return (String) message.getHeaders().get("spring.cloud.function.definition");
// }
// };
// }

@Bean
public Function<String, String> uppercase() {
Expand All @@ -40,10 +40,10 @@ public Function<String, String> uppercase() {
}

@Bean
public Function<String, String> lowercase() {
public Function<String, String> reverse() {
return v -> {
System.out.println("Lowercasing " + v);
return v.toUpperCase();
System.out.println("Reversing " + v);
return new StringBuilder(v).reverse().toString();
};
}

Expand Down

0 comments on commit 1753020

Please sign in to comment.