我正在用spring配置服务器进行一个小项目的实验。配置回购由gitlab维护,gitlab受密码保护。当我站起来配置服务器项目时,我会收到以下警告,也没有读取来自gitlab回购的属性。
Invalid cookie header: "Set-Cookie: experimentation_subject_id=ImJiYTI3NmEzLWJmMWsfdfsdefdfiMmJlLTBjMTM1Njk3Mzg1MiI%3D--7a607dacd6c529dba85t5yd8067da9e1298f6ed; domain=.example.com; path=/; expires=Mon, 18 Jun 2040 09:52:48 -0000; secure; HttpOnly". Invalid 'expires' attribute: Mon, 18 Jun 2040 09:52:48 -0000config-server - application.properties
server.port=8888
spring.cloud.config.server.git.uri=https://gitlab.example.com/example/config-service.git
spring.cloud.config.server.git.username=*******
spring.cloud.config.server.git.password=*******
spring.cloud.config.server.git.skip-ssl-validation=true
spring.cloud.config.server.git.clone-on-start=true人们提出了类似的问题,在不同的项目中抛出了异常,解决方案是升级apache客户端http客户端版本。但是,在检查我使用的配置服务器时,apache客户端的版本是4.5.10。
这里没有其他配置吗?请让我知道你的意见。谢谢。
发布于 2020-12-17 11:41:13
我也有同样的问题,而我们根本不需要cookie(无状态客户端)。我不知道您的情况是否如此,但是您可以禁用Spring使用的ApacheHttpClient的cookie管理。disableCookieManagment()在我们的末端修正了这个错误。
@Bean
public ApacheHttpClient httpclient() {
return new ApacheHttpClient(
org.apache.http.impl.client.HttpClientBuilder
.create()
.disableCookieManagement()
.disableConnectionState()
.build());
}https://stackoverflow.com/questions/62447646
复制相似问题