[MSA] Spring Cloud Config git http.postbuffer out of range error

정명진·2023년 9월 20일
0

MSA 공부를 하며 Config server를 따로 만들 필요가 있었다. 깃에서 관리를 하기 위해 깃 repo를 만든후 config 서버에 연결을 시켜줬는데 다음과 같은 에러가 발생했다.

Caused by: java.lang.IllegalArgumentException: Integer value http.postbuffer out of range

해당 문제를 찾아보니 git buffer size를 조정하면 해결이 된다고 한다.

git config --global http.postBuffer 1024

그후 config 서버가 정상적으로 로드되는지 시도했다.

GET http://localhost:8888/ecommerce/dev

그랬더니 정상적으로 로드가 되었다.

{
  "name": "ecommerce",
  "profiles": [
    "dev"
  ],
  "label": null,
  "version": "a0ae87edce595ba77470b5b61bea6d234c0c9e4e",
  "state": null,
  "propertySources": [
    {
      "name": "${git url}",
      "source": {
        "token.secret": "${token}",
        "token.expiration.time": 86400002,
        "gateway.ip": "${ip}"
      }
    },
    {
      "name": "${git url}",
      "source": {
        "token.secret": "${token}",
        "token.expiration.time": 86400002,
        "gateway.ip": "${ip}"
      }
    }
  ]
}
profile
개발자로 입사했지만 정체성을 잃어가는중... 다시 준비 시작이다..

0개의 댓글