묻고 답해요
160만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
- 
      
        
    해결됨비전공자도 이해할 수 있는 AWS 입문/실전
절차대로 따라왔는데, 화면과 달라 문의드립니다.
절차대로 따라왔는데, 강의 화면(4분 26초경)처럼 4개가 뜨지않습니다. 2개 이상의 서브넷을 지정해야하는데 해당 강의처럼 되지 않아서 진행을 하지 못하는 상황인데요. 해당건 관련해서 어떻게 해야할지요?
 - 
      
        
    미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
DTO getter 메서드
안녕하세요.다름이 아니라 제가 혼자 연습하다가 헷갈리는 점이 있어서 질문드립니다!! 일단 JSON형식의 응답을 만들기 위해서 DTO에 멤버변수에 대한 getter메서드가 있어야 한다는 것은 알고 있습니다!! 그래서 아래 코드와 같이 응답 DTO를 만들었습니다.@Getter @Setter public class WeatherInfoResponse { private String baseDate; private String baseTime; private String category; private String fcstDate; private String fcstTime; private List<WeatherAndTemp> weatherAndTempList; public WeatherInfoResponse(List<WeatherAndTemp> weatherAndTempList) { this.weatherAndTempList = weatherAndTempList; } }그런데 문제가 저 WeatherAndTemp 객체를 담는 리스트 부분입니다.아래가 WeatherAndTemp 클래스입니다.@Getter public class WeatherAndTemp { private String weather; private String temp; public WeatherAndTemp(String weather, String temp) { this.weather = weather; this.temp = temp; } }제가 헷갈리는 점이 처음에 WeatherAndTemp 클래스를 getter 메서드를 생성하지 않고 만들었다가 오류가 났었습니다. 그런데 getter 메서드를 생성하니 잘됩니다. 저는 원래 응답 DTO만 Getter가 필요하다고 알고 있었는데 저런 경우는 어떤 경우인가요? 응답 DTO의 멤버변수에 사용되는 클래스도 Getter 메서드를 만들어야 하나요?
 - 
      
        
    해결됨비전공자도 이해할 수 있는 CI/CD 입문·실전
echo로 깃허브 액션내 서버에서 yml 파일 생성시 질문
spring: jpa: open-in-view: false hibernate: ddl-auto: none properties: hibernate.default_batch_fetch_size: 100 --- spring.config.activate.on-profile: local spring: jpa: hibernate: ddl-auto: create properties: hibernate: format_sql: true show_sql: true h2: console: enabled: true storage: datasource: core: driver-class-name: org.h2.Driver jdbc-url: jdbc:h2:mem:core;MODE=MySQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE username: sa pool-name: core-db-pool data-source-properties: rewriteBatchedStatements: true --- spring.config.activate.on-profile: local-dev spring: jpa: properties: hibernate: show_log: true format_sql: true show-sql: true storage: datasource: core: driver-class-name: com.mysql.cj.jdbc.Driver jdbc-url: jdbc:mysql://${storage.database.core-db.url} username: ${storage.database.core-db.username} password: ${storage.database.core-db.password} maximum-pool-size: 5 connection-timeout: 1100 keepalive-time: 30000 validation-timeout: 1000 max-lifetime: 600000 pool-name: core-db-pool data-source-properties: socketTimeout: 3000 cachePrepStmts: true prepStmtCacheSize: 250 prepStmtCacheSqlLimit: 2048 useServerPrepStmts: true useLocalSessionState: true rewriteBatchedStatements: true cacheResultSetMetadata: true cacheServerConfiguration: true elideSetAutoCommits: true maintainTimeStats: false위의 yml 파일을 깃허브 액션내 서버에서 생성하려구 합니다. - name: db-core.yml 파일 만들기 run: echo "${{ secrets.APPLICATION_PROPERTIES }}" > ./storage/db-core/src/main/resources/db-core.yml액션 스크립트에서 강의와 같이 설정하면 아래와 같은 에러가 뜹니다 ㅠㅠecho 명령어가 특수문자(---)에 대해서 처리를 못하는 걸까요?Run echo "*** /home/runner/work/_temp/63b7a555-4d5d-42d4-971d-fe62ef3e0580.sh: line 70: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** : bad substitution Error: Process completed with exit code 1.
 - 
      
        
    미해결스타트업 성장과 함께하는 AWS 클라우드 아키텍쳐 올인원
504 gateway time-out
SpringBoot 로 백엔드 서버를 구축하는 과정에서 로드밸런서와 하나의 인스턴스를 붙여서 가동했습니다. 그러나 간헐적으로 504 gateway time-out이 발생하는데 그 이유가 무엇인가요?
 - 
      
        
    해결됨비전공자도 이해할 수 있는 CI/CD 입문·실전
8080 포트에서 실행 중인 프로그램이 없습니다.
ubuntu@ip-172-31-86-200:~$ cd memberCertification ubuntu@ip-172-31-86-200:~/memberCertification$ ./gradlew clean build BUILD SUCCESSFUL in 7s 6 actionable tasks: 6 executed ubuntu@ip-172-31-86-200:~/memberCertification$ ls build build.gradle gradle gradlew gradlew.bat settings.gradle src ubuntu@ip-172-31-86-200:~/memberCertification$ cd build ubuntu@ip-172-31-86-200:~/memberCertification/build$ ls classes generated libs resolvedMainClassName resources tmp ubuntu@ip-172-31-86-200:~/memberCertification/build$ cd libs ubuntu@ip-172-31-86-200:~/memberCertification/build/libs$ ls memberCertification-0.0.1-SNAPSHOT-plain.jar memberCertification-0.0.1-SNAPSHOT.jar ubuntu@ip-172-31-86-200:~/memberCertification/build/libs$ nohup java -jar memberCertification-0.0.1-SNAPSHOT.jar & [1] 1678 ubuntu@ip-172-31-86-200:~/memberCertification/build/libs$ nohup: ignoring input and appending output to 'nohup.out' ubuntu@ip-172-31-86-200:~/memberCertification/build/libs$ sudo lsof -i:8080 ubuntu@ip-172-31-86-200:~/memberCertification/build/libs$ build를 했는데 publicIPs에 8080 포트를 주소에 입력하면 "연결을 거부했습니다." 라는 문구가 뜹니다.8080 포트가 쓰이지 않는 거 같아 cat nohup.out을 입력해보면 org.postgresql.util.PSQLException: FATAL: password authentication failed for user "jjeong" at org.postgresql.core.v3.ConnectionFactoryImpl.doAuthentication(ConnectionFactoryImpl.java:693) ~[postgresql-42.6.0.jar!/:42.6.0] org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'entityManagerFactory' defined in class path resource [org/springframework/boot/autoconfigure/orm/jpa/HibernateJpaConfiguration.class]: [PersistenceUnit: default] Unable to build Hibernate SessionFactory; nested exception is org.hibernate.exception.GenericJDBCException: Unable to open JDBC Connection for DDL execution [FATAL: password authentication failed for user "jjeong"] [n/a] application.properties#datasource spring.datasource.driver-class-name=org.postgresql.Driver spring.datasource.url=jdbc:postgresql://localhost:5432/membercertification spring.datasource.username=jjeong spring.datasource.password=0525url, username, password가 다 들어맞는 것도 확인했습니다. build.gradledependencies { implementation 'org.springframework.boot:spring-boot-starter-security' implementation 'org.springframework.boot:spring-boot-starter-web' implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-data-jpa' implementation 'org.modelmapper:modelmapper:3.1.0' implementation 'org.thymeleaf.extras:thymeleaf-extras-springsecurity6:3.1.2.RELEASE' // implementation 'org.hibernate.orm:hibernate-core:6.2.6.Final' compileOnly 'org.projectlombok:lombok' runtimeOnly 'org.postgresql:postgresql' annotationProcessor 'org.springframework.boot:spring-boot-configuration-processor' annotationProcessor 'org.projectlombok:lombok' testImplementation 'org.springframework.boot:spring-boot-starter-test' testImplementation 'org.springframework.security:spring-security-test' testImplementation 'org.junit.jupiter:junit-jupiter-api:5.10.0' testRuntimeOnly 'org.junit.jupiter:junit-jupiter-engine:5.10.0' testRuntimeOnly 'org.junit.platform:junit-platform-launcher' developmentOnly 'org.springframework.boot:spring-boot-devtools' } 어디가 문제인지 모르겠습니다 ㅠㅠ
 - 
      
        
    해결됨비전공자도 이해할 수 있는 CI/CD 입문·실전
InteliiJ IDEA에서 빌드 시 에러가 발생하지 않는데, EC2에서 빌드 시 에러가 발생합니다.
혹시 코드를 수정하고 계속 commit 해서, 맨 처음에 clone 했을 때의 코드와 현재 코드가 다른데 추가로 어떤 명령어를 더 입력해야 하나요 ?깃허브 주소입니다 ! https://github.com/jjeong1015/memberCertification/tree/main
 - 
      
        
    해결됨비전공자도 이해할 수 있는 CI/CD 입문·실전
./gradlew clean build --warning-mode=all --stacktrace 빌드 에러
https://www.inflearn.com/questions/1277467/%EB%B9%8C%EB%93%9C-%EC%8B%9C-%EC%97%90%EB%9F%AC%EA%B0%80-%EB%B0%9C%EC%83%9D%ED%95%A9%EB%8B%88%EB%8B%A4 말씀하신 명령어로 입력해보았으나 해당 에러들이 발생하였습니다 !깃허브 주소 : https://github.com/jjeong1015/memberCertification
 - 
      
        
    미해결중급, 활용편 #1 DevOps : Infrastructure as Code with AWS and 테라폼
세팅 질문입니다.
안녕하세요, 강사님강의 복습중입니다.한 가지 궁굼한 점이 있습니다.강의 외적인 부분인데iterm 세팅을 어떻게 하고 계신가요?커서 옮길때 매우 빠른(?) 속도를 갖고 계시던데테마 등 정보 공유 부탁드리겠습니다!아참,5월에 테라폼 강의 준비해주신다고 하셨는데...테라폼이 아닌, aws강의를 준비하셔서 조금 섭섭하네요.. ㅋㅋ
 - 
      
        
    해결됨Golang을 통한 백엔드 개발 및 환경 구축하기
repository 트랜잭션 관련 질문
안녕하세요 스프링으로 개발하고 있는 뉴비인데, 최근에 golang에 흥미가 생겨서 강의를 듣게 되었습니다.이제 강의를 다 수강하고, gorm을 사용해서 db연결까지 해보려고 하는데, 궁금증이 생겨서, 강의의 범위를 벗어나지만 질문드리려고 합니다스프링에서는 서비스 계층에 트랜잭션을 선언후 그 안에서 벌어지는 db관련 로직들을 원자적으로 실행할 수 있습니다. 트랜잭션의 전파를 통해, 서비스에서 다른 서비스를 호출해도 하나의 트랜잭션으로 묶을 수 있고요. gin에서 동일한 결과를 내고 싶은데, 제가 찾은 방법 2가지가 있습니다 DB 객체를 서비스에서 필드로 보관하면서 repository를 호출할때마다 인자로 DB에 트랜잭션을 적용해 를넘겨준다 (또는 트랜잭션을 받는 wrapper function을 사용한다) => 코드작성량이 ㄷㄷrepository에 임시적인 WithTransaction(tx)메서드를사용해, repository의 DB가 임시로 트랜잭션을 바라보게한다. =>싱글톤에서 말도 안되는 방법인거 같은데 gpt가 강추함컨텍스트에 트랜잭션 DB객체를 담아 모든 곳에서 꺼내 사용한다 => gpt, google 모두 권장되지 않는 방법이라고 함3줄요약전부다 다 뭔가 이상한거 같아서, 실무에서 golang을 사용하면 서비스에서 다수의 DB접근이 필요하고, 이를 하나의 트랜잭션으로 관리해야될 때 어떻게 트랜잭션을 처리하는지 궁금합니다!!
 - 
      
        
    미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
Mysql 연결 부분 오류
spring: datasource: url: "jdbc:mysql://localhost/library" username: "root" password: "비밀번호" driver-class-name: com.mysql.cj.jdbc.Driver위와 같이 application.yml 파일을 작성했는데, 사용자 등록을 하면 서버 내부 오류라고 뜨면서 아무것도 안되더라구요.개발자 도구로도 봤는데 뭐가 문제인지 잘 모르겠어서 구글을 찾아보다가 jpa: database: mysql hibernate.ddl-auto: update show-sql: trueapplication.yml 파일에 추가로 이걸 입력하니까 정상적으로 작동하네요.. 혹시 이렇게 두고 실행해도 괜찮은건지 여쭤보고싶었습니다!
 - 
      
        
    미해결AWS Certified Solutions Architect - Associate 자격증 준비하기
강의 연장 부탁드립니다
6월말 시험 신청했는데 강의 연장 부탁드리겠습니다
 - 
      
        
    미해결실전! GitHub Actions으로 CI/CD 시작하기
일부 event는 디폴트 브랜치에서만 동작한다 ?
일부 event는 디폴트 브랜치에서만 동작한다고 하셨는데 디폴트 브랜치를 pr-test로 바꾸면 pr-test가 디폴트 브랜치니까 issue 생성 시 event가 일어나야 하는 것 아닌가요? 제가 잘못 이해한 걸 까요..?
 - 
      
        
    미해결AWS Certified Solutions Architect - Associate 자격증 준비하기
강의 연장 부탁드립니다.
강의연장부탁드려도될까요 6월 한달간 다 듣는 걸 목표로 하겠습니다 급하게 따야할 일이 생겼는데 미루다 이제 듣기 시작했네요부탁드리겠습니다..!! 감사합니다.
 - 
      
        
    해결됨비전공자도 이해할 수 있는 CI/CD 입문·실전
빌드 시 에러가 발생합니다.
ubuntu@ip-172-31-86-200:~/memberCertification$ ./gradlew clean buildDeprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 15s 8 actionable tasks: 8 executed ubuntu@ip-172-31-86-200:~/memberCertification$ ./gradlew clean build > Task :test MemberCertificationApplicationTests > contextLoads() FAILED java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:180 Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1773 Caused by: org.hibernate.service.spi.ServiceException at AbstractServiceRegistryImpl.java:276 Caused by: org.hibernate.HibernateException at DialectFactoryImpl.java:191 1 test completed, 1 failed > Task :test FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > There were failing tests. See the report at: file:///home/ubuntu/memberCertification/build/reports/tests/test/index.html * Try: > Run with --scan to get full insights. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 15s 8 actionable tasks: 8 executed ubuntu@ip-172-31-86-200:~/memberCertification$ ./gradlew clean build > Task :test MemberCertificationApplicationTests > contextLoads() FAILED java.lang.IllegalStateException at DefaultCacheAwareContextLoaderDelegate.java:180 Caused by: org.springframework.beans.factory.BeanCreationException at AbstractAutowireCapableBeanFactory.java:1773 Caused by: org.hibernate.service.spi.ServiceException at AbstractServiceRegistryImpl.java:276 Caused by: org.hibernate.HibernateException at DialectFactoryImpl.java:191 1 test completed, 1 failed > Task :test FAILED FAILURE: Build failed with an exception. * What went wrong: Execution failed for task ':test'. > There were failing tests. See the report at: file:///home/ubuntu/memberCertification/build/reports/tests/test/index.html * Try: > Run with --scan to get full insights. Deprecated Gradle features were used in this build, making it incompatible with Gradle 9.0. You can use '--warning-mode all' to show the individual deprecation warnings and determine if they come from your own scripts or plugins. For more on this, please refer to https://docs.gradle.org/8.7/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 14s 8 actionable tasks: 8 executed구글에 검색해본 결과, java: error: invalid flag: --warning-mode=all을 하면 된다는 글을 보고 Preferences > Compiler > java Compiler에 --warning-mode all --stacktrace 입력을 하고 실행을 해봤습니다.java: error: invalid flag: --warning-mode=all가 발생하며 실행이 되지 않습니다. 어떻게 해야 에러를 고칠 수 있을까요 ?
 - 
      
        
    해결됨비전공자도 이해할 수 있는 CI/CD 입문·실전
tar.gz 압축 질문있습니다
- name: S3에 프로젝트 폴더 업로드하기 run : aws s3 cp --region 과정을 통해서 압축된 tar.gz 파일은 s3에 저장한다고 이해했는데 따로 압축해제하는 과정이 없어서 질문드립니다. run: aws s3 cp --region ... 다음 S3에 프로젝트 폴더 업로드 하는 과정에서 s3에서 해당 파일을 받고 난 후에 알아서 압축해제를 하는건가요??
 - 
      
        
    미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
DTO request와 response
dto에서 request를 구성할 때에 Create와 Update에 대한 request를 두 개로 나누어 구성하시는 것을 봤습니다.제가 생각하기에 user 테이블에 접근하여, userService에 사용되기 위한 것이니 UserRequest라는 클래스를 만들어 하나로 통합하여 사용하면 보기 편하고 사용하기 쉬울 것 같습니다.성능에서 차이가 있다던지 request를 따로 구별해서 사용하신 이유가 있는지 궁금합니다.
 - 
      
        
    미해결실전! GitHub Actions으로 CI/CD 시작하기
gh auth login 관련 질문드립니다!
Run echo | gh auth login --with-token! First copy your one-time code: 0937-4E42Open this URL to continue in your web browser: https://github.com/login/device이런식으로 계속 코드를 입력해줘야 다음 step이 시작이 되던데 입력하지않고 할수있는 방법이 있을까요?
 - 
      
        
    미해결AWS 배포 완벽가이드 (feat. Lightsail, Docker, ECS)
[AWS 배포 완벽가이드] artillery 버전
강사님 안녕하세요artillery로 부하테스트를 하던중로컬에서는 성공했지만, 배포환경에서는 정상작동하지 않아해결법을 찾는중입니다강의에서는 artillery의 버전이 나오지 않는데요아마도 제가 설치한 버전과의 차이도 원인이 될 수 있을거라 생각이 되는데, 강의시 설치된 버전을 알 수 있을까요(강의 너무 재밌게 잘 보고 있습니다!)
 - 
      
        
    미해결Do It! 장고+부트스트랩: 파이썬 웹개발의 정석
doitdjango 블로그 게시판 작동 오류
안녕하세요.요즘에 'aws lightsail 로 프로젝트 옮기기'를 듣고 있습니다.거기서 블로그 글을 참고하라고 하셔서, 블로그를 들어갔더니, 해당 블로그 게시판이 작동하지 않습니다.확인 부탁드려도 될까요? 감사합니다.
 - 
      
        
    해결됨비전공자도 이해할 수 있는 CI/CD 입문·실전
Github Actions는 성공적으로 끝났는데 docker 컨테이너가 실행되지 않습니다.
ci/cd가 끝난 후 ec2에서 docker ps 명령어를 쳤는데 컨테이너가 실행되지 않습니다. docker ps -a 명령어로 보니 status 가 Exited로 나오네요.ec2 사양은 t2micro 로 했는데 이 영향이 있을까요?