묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결[개정3판] Node.js 교과서 - 기본부터 프로젝트 실습까지
ws 프로토콜 연결시 사이트 연결할 수 없음 메세지가 나오고 페이지 호출이 되지 않습니다.
브라우저 사파리에서는 정상동작 합니다참고로 크롬 버젼은 123.0.6312.107(공식 빌드) (arm64)맥에서 실행했습니다.
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
User와 loanhistory 관계
User가 UserLoanHistory를 가지게 됨으로써 대출하는 로직이 간단해지지만 UserLoanHistory관련 CRUD를 전부 User에서 비즈니스 로직을 처리해야하는 건가요? User가 처리하는 로직이 너무 많아지는 것 같아 이게 객체지향적인 게 맞나 고민이 되네요 현재 경우는 C U 밖에 없지만 만약 예를 들어서 작가와 책 엔티티가 있을 때 연관관계의 주인은 책에 있지만 작가가 보유한 책을 조회하는 로직을 더 간편하게 처리하기 위해 작가는 책을 리스트로 가지면서 생명주기를 관리하면, 책을 수정하거나 삭제할 때도 무조건 작가의 도메인에서 로직을 처리하게 되는 건가요? 단일책임원칙을 위배하는 것이 아닌가 고민이 되어 질문드립니다!
-
해결됨입문자를 위한 Spring Boot with Kotlin - 나만의 포트폴리오 사이트 만들기
[실습]Thymeleaf- 부트스트랩 템플릿 - 자료가 달라요 ...
안녕하세요 틈틈히 공부 하고 있는데 여기까지 왔네요..이해를 못하는 부분이 좀있어서 첨 부터 다시 보고 여기 까지 왔는데 모르는부분은 인터넷에서 확인하고 알아갔는데 강의 내용에서 알려주신 자료와 강의 하신 자료가 다른거 같아서 이렇게 글 남기네요 Personal - Free Bootstrap Template - Start Bootstrap에서 받은 자료을 받아서 압축 풀면 ======================================== 위처럼 나타납니다. 강의 내용에서 자료를 받은 내용은 이렇더라구요=============================제자료는 강사님의 자료 처럼 Vendor이 없어요...강의 노트를 확인하면 [링크에서 템플릿 파일 다운로드 후 압축을 해제하고, 파일과 폴더를 각각 아래 경로에 추가합니다. 디렉토리가 없다면 만듭니다]라고 적혀 있어서 위 처럼 폴더를 만들긴 했지만 vendor폴더가 없어요 강사님의 git에 있는 벤드를 가져와서 붙여도 되나요?? 그러면 강의 내용을 앞서 가는거 같아서 하다가 말았어요...Vendor 폴더 그냥 폴더만 만들고 계속 강의 들어도 되나요?
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
안녕하세요 다른분 질문에서 강사님에 답변에서 질문있습니다.!!
똑같은 이름의 책 등록을 막기 위해서는 스프링 부트의 멀티스레드 구조와 단일 인스턴스 - 서버가 1대인 경우 - 일 때의 synchronized 구문, 멀티 인스턴스 - 서버가 N>=2 대 인경우 - 일 때의 DB unique key 등을 언급해야 하고, (이 과정에서 서버의 인프라도 설명이 들어갑니다!) 동시 대출을 방어하기 위해서는 DB의 Lock(잠금) 종류와 원리에 대해 설명해야 합니다. 이렇게 답변주셨는데 대용량 트래픽 개인프로젝트를 설계한다고 해야한다면 서버를 여러대 생각을 하고 DB unique key를 생각을 해야할지 먼저 서버 1대를 생각하고 synchronized 구문으로 똑같은 이름의 책 등록을 막아야할지 고민입니다.!!
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
그럼 연관관계를 사용하는 것이 항상 좋을까?라는 말씀에 질문있습니다.
비즈니스 요구사항,기술적인 요구사항,도메인 아키텍처 등 여러 부분을 고민해서 연관관계를 사용을 선택해야한다고 하셨고 도메인을 설계할 때 이거는 이렇게 하니까 이렇게 하자 저거는 저렇기 때문에 저렇게하자라고 하셨습니다.실례가 될수 있지만 강사님께서는 어떻게하시는지 예시를 좀 들어주실수 있을까요..?개인프로젝트할때 도움이 될것같습니다!!!
-
미해결백엔드 개발자 성능 개선 초석 다지기
ngrinder쪽에 스크립트 클릭시 오류
실습도중 Script 클릭시 해당 오류가 납니다. 컴퓨터 스펙은 m1 입니다.. 2024-03-25 14:53:51,833 ERROR FileEntryRepository.java:192 : Error while fetching files from SVN for admin 다른 버전으로 설치해도 동일한 이슈가 나서 혹시 해결하셨던 내용이 있을지 문의드립니다.
-
해결됨
spring에서 Entity작성 후 [Table ' ' doesn't exist] 오류
영화 예매 관련 Entity를 작성 후 DB확인차 실행했는데 다른 Entity는 테이블이 잘 만들어진 것을 확인할 수 있었지만 이상하게 Seat Entity만 테이블이 만들어지지 않았습니다. WARN 3508 --- [Movie Ticketing] [ restartedMain] o.m.jdbc.message.server.ErrorPacket : Error: 1146-42S02: Table 'ticketing.seat' doesn't exist WARN 3508 --- [Movie Ticketing] [ restartedMain] o.h.t.s.i.ExceptionHandlerLoggedImpl : GenerationTarget encountered exception accepting command : Error executing DDL " alter table seat add constraint FKgik5885qsff01sxe7v3kqjrhx foreign key (theater_id) references theater (theater_id)" via JDBC [(conn=216) Table 'ticketing.seat' doesn't exist] org.hibernate.tool.schema.spi.CommandAcceptanceException: Error executing DDL " alter table seat add constraint FKgik5885qsff01sxe7v3kqjrhx foreign key (theater_id) references theater (theater_id)" via JDBC [(conn=216) Table 'ticketing.seat' doesn't exist]at org.hibernate.tool.schema.internal.exec.GenerationTargetToDatabase.accept(GenerationTargetToDatabase.java:94) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.tool.schema.internal.Helper.applySqlString(Helper.java:233) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.tool.schema.internal.Helper.applySqlStrings(Helper.java:217) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createForeignKeys(SchemaCreatorImpl.java:303) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.tool.schema.internal.SchemaCreatorImpl.createFromMetadata(SchemaCreatorImpl.java:250) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.tool.schema.internal.SchemaCreatorImpl.performCreation(SchemaCreatorImpl.java:172) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:142) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.tool.schema.internal.SchemaCreatorImpl.doCreation(SchemaCreatorImpl.java:118) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.performDatabaseAction(SchemaManagementToolCoordinator.java:256) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final] at org.hibernate.tool.schema.spi.SchemaManagementToolCoordinator.lambda$process$5(SchemaManagementToolCoordinator.java:145) ~[hibernate-core-6.4.4.Final.jar:6.4.4.Final]application.yml은ddl-auto.create입니다. 대소문자 구분이 문제인가 싶어 @Table(name = "seat")도 추가하고 lower_case_table_names = 1인 것도 확인했는데 똑같이 에러가 발생하더라구요하루종일 찾아봐도 이유를 잘 모르겠습니다 왜그런걸까요 ㅠㅠㅠSeat Entity 코드는 아래와 같습니다.@Entity @Table(name = "seat") class Seat { val row : String? = null val column : Int? = null //좌석 선택 @Enumerated(EnumType.STRING) val selectStatus : SelectStatus? = null // POSSIBLE, IMPOSSIBLE @ManyToOne(fetch = FetchType.LAZY) @JoinColumn(name = "theater_id") val theater : Theater? = null @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "seat_id") val id : Long = 0L }
-
해결됨입문자를 위한 Spring Boot with Kotlin - 나만의 포트폴리오 사이트 만들기
실습리포지토리 테스트 코드 작성 강의 오류
안녕하세요 또 이렇게 질문하게 되네요 먼저 코드는 틀린거 없이 Git 내용과 강의 내용코드 그대로 작성하였습니다. 하지만 왜 일까요?? 에러가 나네요 이부분이 에러 납니다. al experience = experienceRepository.findAll()======================@Test fun testFindAll() { println("---- findAll 테스트 시작 ----") val experience = experienceRepository.findAll() assertThat(experience).hasSize(DATA_SIZE) println("experiences.size: ${experience.size}") for (experience in experience) { assertThat(experience.details).hasSize(experience.title.toInt()) println("experience.details.size: ${experience.details.size}") } println("---- findAll 테스트 종료 ----") }==================================== 이부분도요 findAllByIsActive(true) @Test fun testFindAllByIsActive() { println("----- findAllByIsActive 테스트 시작 -----") val experiences = experienceRepository.findAllByIsActive(true) assertThat(experiences).hasSize(DATA_SIZE) println("experiences.size: ${experiences.size}") for (experience in experiences) { assertThat(experience.details).hasSize(experience.title.toInt()) println("experience.details.size: ${experience.details.size}") } println("----- findAllByIsActive 테스트 종료 -----") } 에러 코드는 기니깐 핵심 부분만 올려 드리면 Hibernate: select e1_0.experience_id,e1_0.created_date_time,e1_0.description,d1_0.experience_id,d1_0.experience_detail_id,d1_0.content,d1_0.created_date_time,d1_0.is_active,d1_0.update_date_time,e1_0.end_month,e1_0.end_year,e1_0.is_active,e1_0.start_month,e1_0.start_year,e1_0.title,e1_0.update_date_time from experience e1_0 left join experience_detail d1_0 on e1_0.experience_id=d1_0.experience_id where e1_0.is_active=?org.springframework.orm.jpa.JpaSystemException: No default constructor for entity 'com.justkim.portfolio.domain.entity.ExperienceDetail' at org.springframework.orm.jpa.vendor.HibernateJpaDialect.convertHibernateAccessException(HibernateJpaDialect.java:341) 이이쿠 한줄만 적는데도 기네요 ExperienceDetail.kt 코드는@Entity class ExperienceDetail(content: String, isActive: Boolean) : BaseEntity() { @Id @GeneratedValue(strategy = GenerationType.IDENTITY) @Column(name = "experience_detail_id") var id:Long? = null var content: String = content var isActive: Boolean = isActive fun update(content: String, isActive: Boolean) { this.content = content this.isActive = isActive } }이런데 ExperienceDetail( 가 계속 경고를 때리네요Class 'ExperienceDetail' should have [public, protected] no-arg constructor https://github.com/justkjy/portfolio-justkim 깃 주소입니다 구글에서 위 에러를 검색하니깐 인프런 오류 질문이 올라 와 있던데 봐도 모르겠네요 https://www.inflearn.com/questions/931371/test-%EC%98%A4%EB%A5%98 감사합니다.
-
해결됨장래쌤과 함께하는 쉽고 재미있는 SQL 이야기
mysql 설치 오류로 학습 불가
강사님 안녕하세요 강의 신청을 했는데, 2일동안 아무리 sql 환경 셋팅을 해보려했는데 제 pc에서는 서버 연결이 안되서 죄송하지만 혹시 환불 해주실 수 있을까요? 자료는 모두 삭제 완료 하였습니다ㅜㅜ 다른 DB 강의를 들어야 할 거 같습니다. 현재 환불 버튼이 없어져서 인프런에 요청 해주시면 정말 감사하겠습니다 ㅜㅜㅜㅜ
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
자바 스프링부트 버전 선택
스프링부트 버전이 2.7x 버전은 없는데 무엇으로 선택해야 하나요?
-
미해결백엔드 개발자 성능 개선 초석 다지기
이미 퇴사한 시점에서의 최선의 선택
현재 말씀하시는 대상이 완전 저에게 일치하는데 이미 퇴사를 한 시점이라 주니어 개발자로써 적용하기가 쉽지 않을 것 같은데 이럴때 는 어떻게 하는 게 좋을까요? 강의 내용대로 실무내에서는 문제 없이 기능들을 구현하였는데 이직을 위한 이력서 작성 시 성능 개선 부분에서 작성할 부분이 없네요
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
아직도 시작을 못하고 있어요,,,,,
다음과 같은 오류가 나와서 어떻게 해야할 지 모르겠네요 따로 건든건 없는데요... A problem occurred configuring root project 'library-app'.> Could not resolve all files for configuration ':classpath'. > Could not resolve org.springframework.boot:spring-boot-gradle-plugin:3.0.1. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.0.1 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.0.1 was found. The consumer was configured to find a runtime of a library compatible with Java 11, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '7.5' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares an API of a component compatible with Java 17 and the consumer needed a runtime of a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.0.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component compatible with Java 17 and the consumer needed a component compatible with Java 11 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '7.5') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.0.1 declares a runtime of a component, and its dependencies declared externally: - Incompatible because this component declares documentation and the consumer needed a library - Other compatible attributes: - Doesn't say anything about its target Java version (required compatibility with Java 11) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '7.5')* Try:> Run with --stacktrace option to get the stack trace.> Run with --info or --debug option to get more log output.> Run with --scan to get full insights.
-
미해결
JPA physical-strategy 변환이 안되는 이유가 어떤게 있을까요???
안녕하세요. 스프링부트3 기반으로 api 프로젝트를 셋팅 중 입니다. 그런데 셋팅 중 physical-strategy 이 제대로 동작하지 않아서 이것저것 해보다가도움을 구해보고자 글을 올리게 되었습니다. 우선 프로젝트 환경은스프링부트 = 3.2.2하이버네이트 = 6.3.1.FinalJava = corretto17입니다. application.yml 은 이렇게 설정되어 있습니다. Entity는 카멜케이스로 작성이 된 상태 입니다. DB는 스네이크로 네이밍이 되어 있는 상태입니다. 그런데 JPA 조회 쿼리를 날리면계속 카멜케이스로 조회가 되면서 오류가 발생해서이것저것 해보는데 해결이 안되서 도움을 구해보고자 합니다. 혹시 뭔가 놓치고 있는게 있을까요???
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
수정이라는 작업을 할 때 PUT을 더 사용하는 이유가 있을까요?
HTTP 메서드에 처음 공부할 때 수정의 경우에는 PUT과 PATCH를 사용한다고 배웠는데요. PUT의 경우에는 통째로 갈아끼우는 방식의 갱신이고PATCH의 경우에는 부분 수정이 가능하다고 배웠습니다.이 강의에서는 USER의 정보중에 이름만받고 있어서(PUT은 전체 필드를 명시해주어야 한다고 배웠습니다.) PATCH가 더 적당한 방식이 아닌가라는 생각이 들었습니다. PATCH가 아닌 PUTMapping을 사용하신 이유가 있으실까요? 그리고 이와 관련된 블로그 글들이 많은데 저마다 내리는 결론이 달라서 조금 혼란스럽습니다. 강사님의 생각을 듣고 싶습니다.좋은 강의 만들어주신 태현님을 존중하고 존경하며 이만 글 줄이겠습니다!
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
제가 이해한 것이 맞느지 확인 부탁드립니당
이번에 만든 조회하는 api는 리스트로 반환해야 하기 때문ㅇ JSON이어야 하고그렇기에 함수 반환 값이 List<UserResponse>인건가요?그리고 등록 api에서 만든 users리스트 수만큼 for문 돌려서 진정한 결과 리스트(id도 포함되어있는) reponses를 만들어낸건가요..?
-
해결됨자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
아마존 리눅스 2023 el9 버전 mysql 설치 중 KEY 오류
아마존 리눅스 2023으로 인스턴스를 사용했을 때 지면님과 강사님께서 알려준 el9 버전 레포지토리를 사용하는 명령어sudo dnf install <https://dev.mysql.com/get/mysql80-community-release-el9-1.noarch.rpm> sudo dnf install mysql-community-server 이렇게 하여도 저는 계속 sudo dnf install mysql-community-server 해당 명령어를 통해 설치하려고 하면The GPG keys listed for the "MySQL 8.0 Community Server" repository are already installed but they are not correct for this package.이런 오류가 발생하였습니다.계속 키가 옳지 않다는 오류가 생겼고 챗지피티랑 구글링을 통해 이것저것 해보다가sudo rpm --import https://repo.mysql.com/RPM-GPG-KEY-mysql-2022 sudo yum update 위의 두 명령어를 실행하고sudo dnf install mysql-community-server해당 명령어로 재설치 해주니 제대로 설치가 되었습니다!제 추측으로는 KEY를 다시 받아오고 yum update 하는 과정이 필요했던 것 같습니다! 저와 같은 오류를 가지는 분들에게 도움이 되었으면 좋겠네요...!!!
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
맥 사용시 2002 오류 나오실 경우
mysql.server start명령어 사용해보세요 아직원리는 모르겠는데 명령어 사용 후 mysql -u root입력하시면 sql작동 됩니다
-
미해결자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]
5~6강 질문이요
post방식은 dto 객체 앞에 @RequestBody가 있는데 get방식은 왜 dto객체 앞에 @RequestParam을 안 써요? 맨 처음에 dto 객체 없었을 때 매개변수 이용하였을 때는 @RequestParam 썼던 것 같은데..
-
해결됨Backend 멀티쓰레드 이해하고 통찰력 키우기
코틀린으로 해당 C# 예제를 비슷하게 만들어봤는데, 제가 잘못 작성한 걸까요?
<상황>지식 공유자님께서 작성해주신 C# 코드 예제를 코틀린으로 비슷하게 작성해서 시도해보았지만 같은 상황이 재현되지 않습니다. <질문 의도>제가 지식 공유자님의 코드를 잘못 이해하고 작성한 것인지, 아니면 JVM의 의도치 않은 최적화 때문에 의도와 다르게 동작하는 것인지 궁금합니다. <작성한 코드>fun main (args: Array<String>) { Example().startUp() } class Example() { private var shouldStop = false fun startUp() { println("process start") val thread = Thread(Runnable { doWork() }) thread.start() Thread.sleep(1000) shouldStop = true thread.join() println("process end") } // shouldStop에 @Volatile을 붙이지 않으면 무한 루프를 돌 것이라고 생각했으나 // graceful shutdown이 잘 되어버림 private fun doWork() { while (!shouldStop) { println("doWork..") Thread.sleep(1000) } } } 좋은 강의 만들어주셔서 감사합니다!
-
미해결AWS Certified Solutions Architect - Associate 자격증 준비하기
AWS Aurora 및 RDS 문의
Amazon Aurora 와 RDS를 구분할 때 관련된 내용은 알겠는데요. Aurora가 MySQL과 PostgreSQL과 호환되도록 만든 RDBMS 서버스 인데요Aurora는 독자적인 DB 인가요 ? 아니면 여기에 MySql과 PostgreSQL를 탑재하나요 ?어떤 때는 RDS MySQL 이라고 했다고, Aurora로 했다가Aurora MySQL, Aurora PostgreSQL 로 하는데요잘 이해가 안되어서요.