아래와 같은 패키지 구조가 있다고 하자. [my_first_go] tree -L 3 . └── src ├── helper │ ├── my_first_helper.go │ └── my_second_helper.go └── main.go [my_first_go] 이 때, 각 파일은 다음과 같은 내용을 포함한다. // main.go package main func main() {} // my_first_helper.go package helper import "fmt" func RunFirstHelper() { fmt.Println("Running first helper!!!") } // my_second_helper.go package helper import "fmt" func RunSecondHelper..
@ActiveProfiles("local") @AutoConfigureWebTestClient @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT) class CreateTaskHashTest: BehaviorSpec() { @Autowired private lateinit var client: WebTestClient init { // ...테스트 코드 작성 } } 요렇게 작성했는데도 NoSuchBeanDefinitionException이 뜨는 경우, 아래와 같은 dependency를 추가하자. // build.gradle.kts dependencies { // ...생략 implementation("org.springf..
CloudFront Signed URL을 만드는 과정에서, 문자열로 된 RSA Key를 아래와 같은 코드를 통해 java.security.PrivateKey 인스턴스로 변환하고자 했다. internal fun String.convertToPrivateKey(): PrivateKey { val keyData = this.replace("-----BEGIN RSA PRIVATE KEY-----\n", "") .replace("-----END RSA PRIVATE KEY-----", "") .replace("\n", "") val keyBytes = Base64.getDecoder().decode(keyData) val keySpec = PKCS8EncodedKeySpec(keyBytes) return Key..
내 경우에는 다음과 같은 흐름에서 해당 이슈가 발생하였다. 로컬 환경을 기반으로 zookeper와 kafka 실행 ctrl+c 따위의 명령어로 이들을 모두 종료한 후 다른 짓 다시 실행했을 때, zookeper는 잘 올라오지만 kafka는 다음과 같은 로그와 함께 실행되지 않음 [2023-02-28 22:24:49,384] ERROR Fatal error during KafkaServer startup. Prepare to shutdown (kafka.server.KafkaServer) kafka.common.InconsistentClusterIdException: The Cluster ID IFnjWyYcROOKY57-iqsdPg doesn't match stored clusterId Some(9Kdz..
Windows를 기준으로 사용할 수 없는 문자는 \/:*?"|이고, 파일 명은 온점(.)으로 끝나지 않아야 한다. 요 내용을 정규식으로 표현하면, const regex = /([\\/:*?\"|])|(\.$)/g; 이제 이걸 토대로 String.prototype.replace와 encodeURIComponent를 조합하면 결과는 다음과 같다. const regex = /([\\/:*?\"|])|(\.$)/g; const target = '/\:?"|:\':S.text*.'; const result1 = target.replace(regex, (match) => { return encodeURIComponent(match); }); console.log(result1); // %3C%3E%2F%3A%3F%..
데이터베이스 시딩은 서비스 운영에 필요한 기본적인 데이터를 데이터베이스에 삽입하는 것을 의미한다. 결국 데이터베이스 초기 구성시 서비스에 반드시 필요한 계정이라거나, 포스트 등등을 데이터베이스에 들이 붓는 것! Prisma ORM에서는 seed.ts 파일과 prisma db seed 명령어를 통해 이러한 기능을 제공한다. Seeding your database Learn how to seed your database using Prisma's integrated seeding functionality and Prisma Client www.prisma.io
현상 nest new ./ 명령어를 통해 nest 프로젝트를 구성하려고 했으나, buildDeps에서 멈춤 아래 블로그의 3번 절차를 참고하여 진행했으나 그래도 같은 지점에서 멈춤 일단 참고 링크부터 npm sill idealtree buildDeps에서 멈추는 현상 npm i express --save를 했는데, sill idealTree buildDeps 블라블라에서 진행이 안되어서, 어떻게 하면 할 수 있지 알아봤는데 package-lock.json을 삭제하기 => 안됨 npm install --verbose => 안됨 npm set registry http://regis ggodong.tistory.com 대부분의 경우 위 블로그 방식대로 해결이 된다지만, 나는 'npm set registry h..
- Total
- Today
- Yesterday
- Node.js
- Puppeteer
- Linux
- AWS
- dev
- etc
- AWS IoT
- terraform
- pgloader
- javascript
- 코딩테스트
- spring boot
- Spring Cloud Config
- jQuery
- mysql
- react
- Docker
- Java
- IntelliJ
- JPA
- kotlin
- hashicorp
- Vault
- JEST
- Gradle
- Git
- shell
- postgresql
- Database
- eureka
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | 31 |