6
6
import org .springframework .web .reactive .function .server .ServerResponse ;
7
7
8
8
import static org .springdoc .core .Constants .OPERATION_ATTRIBUTE ;
9
- import static org .springdoc .core .fn .builders .operation .Builder .operation ;
9
+ import static org .springdoc .core .fn .builders .operation .Builder .operationBuilder ;
10
10
import static org .springframework .http .MediaType .APPLICATION_JSON ;
11
11
import static org .springframework .web .reactive .function .server .RequestPredicates .DELETE ;
12
12
import static org .springframework .web .reactive .function .server .RequestPredicates .GET ;
@@ -21,19 +21,19 @@ public class RoutingConfiguration {
21
21
@ Bean
22
22
public RouterFunction <ServerResponse > monoRouterFunction (UserHandler userHandler ) {
23
23
return route (GET ("/api/user/index" ).and (accept (APPLICATION_JSON )), userHandler ::getAll )
24
- .withAttribute (OPERATION_ATTRIBUTE , operation ().beanClass (UserRepository .class ).beanMethod ("getAllUsers" ))
24
+ .withAttribute (OPERATION_ATTRIBUTE , operationBuilder ().beanClass (UserRepository .class ).beanMethod ("getAllUsers" ))
25
25
26
26
.and (route (GET ("/api/user/{id}" ).and (accept (APPLICATION_JSON )), userHandler ::getUser )
27
- .withAttribute (OPERATION_ATTRIBUTE , operation ().beanClass (UserRepository .class ).beanMethod ("getUserById" )))
27
+ .withAttribute (OPERATION_ATTRIBUTE , operationBuilder ().beanClass (UserRepository .class ).beanMethod ("getUserById" )))
28
28
29
29
.and (route (POST ("/api/user/post" ).and (accept (APPLICATION_JSON )), userHandler ::postUser )
30
- .withAttribute (OPERATION_ATTRIBUTE , operation ().beanClass (UserRepository .class ).beanMethod ("saveUser" )))
30
+ .withAttribute (OPERATION_ATTRIBUTE , operationBuilder ().beanClass (UserRepository .class ).beanMethod ("saveUser" )))
31
31
32
32
.and (route (PUT ("/api/user/put/{id}" ).and (accept (APPLICATION_JSON )), userHandler ::putUser )
33
- .withAttribute (OPERATION_ATTRIBUTE , operation ().beanClass (UserRepository .class ).beanMethod ("putUser" )))
33
+ .withAttribute (OPERATION_ATTRIBUTE , operationBuilder ().beanClass (UserRepository .class ).beanMethod ("putUser" )))
34
34
35
35
.and (route (DELETE ("/api/user/delete/{id}" ).and (accept (APPLICATION_JSON )), userHandler ::deleteUser )
36
- .withAttribute (OPERATION_ATTRIBUTE , operation ().beanClass (UserRepository .class ).beanMethod ("deleteUser" )));
36
+ .withAttribute (OPERATION_ATTRIBUTE , operationBuilder ().beanClass (UserRepository .class ).beanMethod ("deleteUser" )));
37
37
}
38
38
39
39
}
0 commit comments