https://www.inflearn.com/questions/693312/profile-email-%EA%B6%8C%ED%95%9C%ED%8E%98%EC%9D%B4%EC%A7%80%EA%B0%80-%EB%82%98%EC%98%A4%EC%A7%80-%EC%95%8A%EC%8A%B5%EB%8B%88%EB%8B%A4 해당 페이지에 있는 해결 방법 그대로 consent required를 킨 후에 access token을 받아오는 것 까지는 잘 되는데, 마찬가지로 userinfo 요청시 http://localhost:8080/realms/oauth2/protocol/openid-connect/userinfo 에 Authorization에 Bearer Token타입 체크 후 Token값도 받아온 access_token값으로 잘 넣어줬는데도 403 forbidden 에러가 뜨네요 무엇이 잘못된걸까요 keycloack버전은 20.0.2입니다
스프링부트 2.7.7, h2 2.1.214 버전 @GeneratedValue(strategy = GenerationType.IDENTITY) 이렇게 생성하게 둬도 글을 새로만들면 id가 1로 만들어져 아이디 중복이라 오류가 뜨길래 INSERT INTO article( title, content) VALUES( '가가가가', '1111'); INSERT INTO article( title, content) VALUES( '나나나나', '2222'); INSERT INTO article( title, content) VALUES( '다다다다', '3333'); 이렇게 data.sql에 id 지정값을 빼니 알아서 id 4로 해주며 잘 작동하네요 혹시 최신버전으로 하시는 분들중 오류가 있으면 참고하세요 DB 버전문제인거같은데 왜그런지는 잘 모르겠네요.. 최신버전에서는 id를 지정해주면 IDENTITY가 작동안하는거 같기도 하네요
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예) [질문 내용] html코드 중 <tr th:each="member : ${members}">의 members는 controller 코드의 members로부터 오는 것으로 알고 있습니다. List<Member> members = memberService.findMembers(); model.addAttribute("members", members); return "members/memberList"; 그런데 members의 값이 memberService.findMembers(); 부터 오는 것이여서 MemoryMemberRepository.java의 findAll()를 찾아봤습니다. @Override public List<Member> findAll() { return new ArrayList<>(store.values()); } 여기서 values() method로 인해서 map의 값만 추출되어 list로 변환해서 받는 것으로 알고 있습니다. 그래서 저는 controller의 members가 값만 list로 나열된 것으로 생각했는데 memberList.html에서 "member : ${members}" member가 list의 value가 아닌 domain.Member class라는 것이 잘 이해가 안됩니다.
users microservice 프로젝트 생성 시, jar와 war의 차이에 대해서 언급해주신 부분에 대해 궁금한 점이 있어 질문 드립니다! 설명 해주시기로, jar로 패키징 시 임베디드 톰캣을 통해 실행이 된다고 하셨는데, IDE에서 프로젝트 실행 시에도 jar는 jre를 통해서 실행되는 것이 아닌가요?.. war로 패키징하는 프로젝트가 웹 어플리케이션 구조로 임베디드 톰캣에 의해 기동된다고 알고 있어서 혼란스러운 부분이 있어서요! 제가 IDE에서 기동할 때와 그냥 서버 위에서 기동할 때를 혼돈하고 있는 걸까요??..
안녕하세요. user-service application.yml spring: application: name: user-service cloud: config: name: ecommerce config: import: optional:configserver:http://localhost:8888 포스트맨에서, POST방식으로 actuator/refresh를 실행했을 때, org.springframework.cloud.config.server.environment.NoSuchLabelException: No such label: main 위와 같은 에러가 발생해서 main 브랜치를 추가했더니, actuator/refresh를 실행했을 때 에러가 발생하지 않게 되었습니다. 예를 들어, token.secret 값을 변경하고 main브랜치에 커밋한 후, actuator/refresh를 실행하면 정상적으로 refresh가 되는 것 같습니다. [ "config.client.version" ] http://localhost:8888/ecommerce/default 에서도 값이 변경되는 것을 확인했습니다. "source": { "token.expiration_time": 86400000, "token.secret": "user_token2", "gateway.ip": "192.168.0.8" } 그런데, /health_check를 실행해보면 새로운 값으로 변경되지 않습니다. It's working in user service, port(local.server.port)=61250, port(server.port)=0, token secret=user_token1, token expiration time=86400000 어디가 잘못된 건지 혹시 알 수 있을까요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 안녕하세요. 새해 복 많이 받으세요 ! 열심히 강의를 수강중인 학생 입니다. updateItemDTO 관련하여 궁금한게 생겨서 문의 남깁니다. 영한님이 말씀해주신 의견에 따라 소스를 변경해보았습니다. Controller updateItemDto (service package안에 뒀습니다) Service Item book 소스는 이런식으로 변경해서 잘 동작 하는 것 확인 했습니다. 궁금점 영한님이 다른 분에게 남겨 준 글을 봤을 때 DTO가 생성되는 계층에 dto class를 작성하라고 쓰여있었습니다. 저의 소스 같은 경우 Controller 에서 인스턴스화 되고 있는데 이럴 때는 Controller 밑에 dto package를 만들었어야 하는건가요? Service 쪽에서 Item findItem = itemRepository.findOne(itemId); findItem.changeItem(updateItemDto); 이 로직을 실행하게 되면 Book, Album , Movie 다 똑같이 changeItem override 해주었습니다. 이후에 Controller에서 Album , Movie 에 필요한 필드 값 세팅 후 Service로 넘겼습니다. 3개의 자식 중에 Book 호출 되게 되는데 이 점이 궁금합니다 (기본적인 자바 지식 일수도 있지만, 구글링을 하여도 적합한 글을 찾지 못해서 글 남겼습니다) 3. 2번과 이어지는 질문인데, 혹시 movie , album , book 을 다 수정할 수 있게 된다면 어떤 식으로 구성해야 좋은지 궁금합니다! 4.처음 view에서 넘겨 받은 BookForm을 itemService.updateItem() 인자로 넘기지 않고 중간에 변환해서 넘긴 이유가 궁금합니다! 5번 질문과 같은 맥락일까요 5.service 계층에서 dto를 의존하게 되는 경우는 어떤 경우인지도 궁금합니다 ! 좋은 강의 잘 보고 있습니다. 항상 감사합니다!
안녕하세요 ㅠㅠ 빌더패턴 사용시 이런식으로 구성하려고하는데요. 이렇게해서 INSERT를 하면 NULL로 받습니다. 그래서 이렇게 putOrder메소드를 만들어서 빌더패턴안에 포문으로 돌려서 해결했는데 이런식으로 하는게 맞는지(?) 되는지(?) 궁금합니다. 또한 https://www.inflearn.com/questions/419013/%EC%97%B0%EA%B4%80%EA%B4%80%EA%B3%84-%ED%8E%B8%EC%9D%98-%EB%A9%94%EC%86%8C%EB%93%9C-%EC%83%9D%EC%84%B1-%EB%A9%94%EC%86%8C%EB%93%9C%EC%97%90-%EB%8C%80%ED%95%B4-%EC%A7%88%EB%AC%B8%EB%93%9C%EB%A0%A4%EC%9A%94 여기서 질문한 것 역시 봤었는데, 왜 저는 저렇게 안되는 걸까요?? @@ 무슨 차이가 있는 걸까요???
build.gradle를 오픈하자마자 다음과 같은 오류가 뜹니다ㅜㅜ 자바는 11버전 설치했고 강의 제일 처음, build.gradle부터 오픈하자마자 저런 오류가 났고 아무것도 안건들었습니다. <오류코드>- 일부만 가져왔습니다. A problem occurred configuring root project 'hello-spring'. > 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.6' 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.6') - 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.6') - 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.6') - 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.6')
제가 ./m2 > repository > org 에 접속을 하면 여러 db가 보이는데 mariadb만 안보입니다. 도대체 이게 어떻게 된 일이죠...? 그래서 이제 MariaDB 사용하기 위해서 해당 jar 파일을 복사 해서 원하는 위치에 넣어야 하는데... 그걸 못해서 진도가 안나가고 있습니다...
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] org.h2.jdbc.JdbcSQLNonTransientException: IO Exception: " java.net .UnknownHostException: ?��채린: ?��?���? ?��?��?���? ?� h2.bat파일을 실행하면 cmd창에 위와 같이 뜨면서 localhost :8082에 접속하면 위의 사진 같은 에러가 납니다. 인프런의 모든 질문을 읽어봐도 저처럼 UnknownHostException 오류가 난 사람은 없어서 질문합니다! (환경변수 설정부터 재부팅, 재설치, 모든 행동을 다 해보았습니다..)
제가 그대로 따라해서 하고 있는데... 왜 안되는지 잘 모르겟네요... 저는 D 드라이브에 별도로 폴더를 생성해서 작업하고 있었는데요, .\bin\windows\connect-distributed.bat .\etc\kafka\connect-distributed.properties 를 실행하면 Error: Could not find or load main class org.apache.kafka.connect.cli.ConnectDistributed Caused by: java.lang.ClassNotFoundException: org.apache.kafka.connect.cli.ConnectDistributed 위와 같은 에러가 나오니... 이유가 뭘까요?
실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)
data class BookRequest( val name: String, val type: BookType, ) 웹에서 폼에 책이름, 타입을 컴퓨터로 선택해서 요청을 보내면 컨트롤러에서 BookRequest에 enum 타입인 type에 자동으로 값이 받아지는건가요? 별도로 converter를 구현안해줘도 되는것인지 궁금합니다
[질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 생각해봤는데 예제라서 상관은없지만 Team에 @OneToMany(mappedBy = "team") private List<Member> members = new ArrayList<>(); 이 부분에서 하나의 팀에 똑같은 회원이 중복안되도록 Set<Member>로 하는것도 괜찮을까요? 아니면 제가 모르는 뭔가 때문에 상관 없을까요?