Skip to content

Commit 71a1cef

Browse files
committed
Update some examples that are not working properly wit Camel Spring Boot 4.16
1 parent 910c6c3 commit 71a1cef

File tree

4 files changed

+8
-4
lines changed

4 files changed

+8
-4
lines changed

endpointdsl/src/main/resources/application.properties

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,5 @@ camel.main.name = MyCamel
2020

2121
# what to say
2222
greeting = Hello World
23+
24+
management.endpoints.web.exposure.include=health,info

openapi-contract-first/daisy.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
{
22
"id": 555,
3-
"name": "Daisy the parrot"
3+
"name": "Daisy the parrot",
4+
"photoUrls": []
45
}

rest-cxf/src/main/java/org/apache/camel/example/springboot/cxf/CamelRouter.java

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@
1818

1919
import org.apache.camel.Exchange;
2020
import org.apache.camel.builder.RouteBuilder;
21-
import org.apache.camel.component.bean.BeanConstants;
2221
import org.apache.camel.component.bean.validator.BeanValidationException;
2322

2423
import org.springframework.stereotype.Component;
@@ -44,8 +43,7 @@ public void configure() throws Exception {
4443
"&loggingFeatureEnabled=true")
4544
.to("bean-validator:user")
4645
.to("log:camel-cxf-log?showAll=true")
47-
.setHeader(BeanConstants.BEAN_METHOD_NAME, simple("${header.operationName}"))
48-
.bean(UserServiceImpl.class);
46+
.toD("bean:userServiceImpl?method=${header.operationName}");
4947
// @formatter:on
5048
}
5149

rest-cxf/src/main/java/org/apache/camel/example/springboot/cxf/UserServiceImpl.java

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,11 @@
2020
import java.util.Map;
2121
import java.util.TreeMap;
2222

23+
import org.springframework.stereotype.Component;
24+
2325
import jakarta.ws.rs.core.Response;
2426

27+
@Component
2528
public class UserServiceImpl implements UserService {
2629

2730
private final Map<Integer, User> users = new TreeMap<>();

0 commit comments

Comments
 (0)