我正在尝试调整一个应用程序,这个应用程序在Spring中运行得很好,但在Spring中却有不同的行为
下面是我使用Spring 5- Spring的代码:
控制员:
@RestController
public class MyRestController {
@GetMapping("/test/{id}/{label}")
public ResponseEntity<Payload> test(@ModelAttribute Payload payload) {
return new ResponseEntity<>
我用的是spring-data-mongodb:2.2.2.RELEASE,spring-boot-starter-webflux:2.2.2.RELEASE和Mongodb v4.2.x。我需要更改数据库排序规则,以便将其设置为对所有查询不区分大小写。
我去看医生:
但我不知道如何将它与反应性模板一起使用。
@Configuration
@EnableReactiveMongoRepositories
class MongoConfig {
// How should I use it?
}
我目前正在努力将代理与Spring-Webflux结合使用。在其他服务中,我总是遵循这种方法,它工作得很好(代理配置是从标准环境变量中检索的):
@Bean
public RestTemplate restTemplate() {
final RestTemplate restTemplate = new RestTemplate();
final CloseableHttpClient client = HttpClientBuilder.create().useSystemProperties().build();
restTemplate.setRequestFa