묻고 답해요
167만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
OrderApiController
웹 개발 구조에서backend - repository - service - controller - frontend이런 식으로 이해를 하고 있었습니다. 강의를 수강 중 MemberApiController는 MemberService를 의존관계 주입을 받아 Api테스트를 진행하는데 OrderApiController는 왜 Service를 주입받지 않고 Repository를 주입받아 사용하는지 궁금합니다.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
<p>태그 관련 질문
1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]여기에 질문 내용을 남겨주세요.프론트 p태그 관련 질문입니다.데이터를 집어 넣지 않고 단순하게 쓰는 p태그의 경우<p>인프런</p> 코드를 실행하면 인프런이 출력되는걸로 알고 있습니다. 강의를 듣다 호기심에 나이스 문자열을 추가해봤는데요나이스1은 타임리프 문법이 적용된 문장이고나이스는 단순한 p태그입니다.하지만 나이스1도 타임리프 관련 코드가 끝나고 괄호를 닫고 추가된 문자인데 왜 출력이 안 되는지 궁금합니다.
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
윈도우 gradlew.bat build 에러 발생
Microsoft Windows [Version 10.0.22621.2861] (c) Microsoft Corporation. All rights reserved. C:\Users\Yoon\Desktop\CS\SpringStudy\hello-spring>gradlew build FAILURE: Build failed with an exception. * What went wrong: 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.2.1. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.1 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.2.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.5' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, 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 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library for use during runtime, 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 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library for use during runtime, 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 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, 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 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.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. > Get more help at https://help.gradle.org. BUILD FAILED in 5s 안녕하세요 어제 동일한 질문을 올렸었는데 파일의 권한을 수정하고 다시 올렸습니다.우선 저는 윈도우 사용자이고, java --version으로 확인해봐도 Java 17버전이고, 설정 가능한 모든 부분에서 17버전으로 바꿨는데도 에러가 발생합니다. 모든 방법을 시도해봐도 cmd에서 "gradlew build" 명령어를 치면 build failed라는 메시지가 출력됩니다. plugins { id 'java' id 'org.springframework.boot' version '3.2.1' id 'io.spring.dependency-management' version '1.1.4' } group = 'hello' version = '0.0.1-SNAPSHOT' java { sourceCompatibility = '17' } repositories { mavenCentral() } dependencies { implementation 'org.springframework.boot:spring-boot-starter-thymeleaf' implementation 'org.springframework.boot:spring-boot-starter-web' testImplementation 'org.springframework.boot:spring-boot-starter-test' } tasks.named('test') { useJUnitPlatform() } 파일 링크: https://drive.google.com/file/d/1hnY1DJJ-9loR_mcQBum97NDgOErGgoMO/view?usp=sharing며칠째 이부분에서 막혀서 진도를 못 나가고 있습니다.. 도와주세요..ㅠㅠ------------------------------------------------------------------------------------------------java 17버전으로 설정해도 오류가 나시는 분들이 계시다면 아래 방법을 따라해보세요. 저는 이렇게 하니 해결되었습니다.인텔리제이 최신버전으로 재설치기존 JDK 삭제 후 최신버전으로 재설치 및 환경변수 등록 (재부팅 필수) 설치한 JDK를 프로젝트에 적용
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
섹션 5-2. JPA에서 em.createQuery(SQL) 질문
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. JPA에서 em.createQuery("select i from Item i", ...)을 쓰시는데 저 구문을 h2에 직접 날려보면 i 를 찾을 수 없다고 나오는데 select * from item을 안 쓰는 이유가 있나요?
-
미해결스프링부트 개념정리(이론)
클라이언트 요청 시 디스패쳐 서블릿 동작에 관해
안녕하세요! 먼저 좋은 강의 해주셔서 감사합니다.다름이 아니라, 강의 마지막 부분의 Spring 동작을 간단하게 설명해주셨는데요. 이 때, 클라이언트로부터 요청이 들어오면 디스패쳐 서블릿이 웹과 관련된 Controller들을 메모리에 올린다고 하셨는데, 스프링부트의 @Controller 어노테이션은 컴포넌트 스캔의 대상이고, 스프링부트 어플리케이션이 로드될 때 Application Context에 등록되는 것으로 알고 있습니다.본 강의에서 말씀해주신 내용과 제가 학습했던 내용에 차이가 있어 질문 드립니다. @Controller 어노테이션을 사용하는 스프링부트의 Controller는 컴포넌트 스캔을 통해 Service, Repository 등과 다른 시점에서 로드되는지말씀해주신 메모리에 올린다는 표현이 Application Context로부터 빈을 주입받는 것을 의미하는건지학습한 지 얼마 안되서 개념에 혼동이 오네요 ㅠ.ㅠ 다시 한번 좋은 강의 감사드립니다!
-
해결됨실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
@Transactional 과 entityManager 범위에 관해 질문 드립니다.
안녕하세요! 강의 수강 중 질문이 생겨 작성합니다.. 답변 부탁드립니다..!ㅠ.ㅠ -- MemberRepository 입니다. ( @Transactional 키워드 모두 지움 )@Repository public class MemberRepository { @PersistenceContext EntityManager em; public Member findMember( Long id ) { Member member = em.find(Member.class, id); return member; } public Member findMember2( Long id ) { Member member = em.find(Member.class, id); return member; } } -- 위 레파지토리를 호출하는 테스트 코드 입니다. ( 데이터는 미리 넣어둔 상태 입니다. )@SpringBootTest class MemberRepositoryTest { @Autowired MemberRepository mRepo; @Test public void test2() { System.out.println("================================================="); System.out.println(mRepo.getClass()); //when Member found1 = mRepo.findMember(1L); Member found2 = mRepo.findMember2(1L); System.out.println("================================================="); //then assertEquals(found2, found1); } } 1 ) 테스트 코드에서 주입받은 mRepo의 클래스 타입을 확인하면 CGLIB로 생성한 프록시 클래스가 출력됩니다. 위 코드에서 보는 바와 같이 @Transactional 어노테이션은 존재하지 않는데도 실 클래스가 아닌 프록시 객체로 만들어지는 이유가 뭔가요?? 2 ) 테스트 코드에서 test2()를 실행하면 select를 2번 실행합니다. test2()에 @Transactional을 걸면 -> select 1번 -> 너무 당연한데MemberRepo 클래스 레벨에서 @Transactional -> 테스트 코드 실행 시 select 2번MemberRepo 클래스 각 메소드에 @Transactional -> 테스트 코드 실행 시 select 2번 2-1) 위와 같은 결과가 발생하는 이유를 모르겠습니다.. @Transactional을 어떻게 걸든 한 메소드가 종료하고 나면 PersistenceContext 가 닫히는 건가요?.. 2-2) MemberRepo 에서 주입받은 entityManager는 proxy 클래스가 맞는거죠..?@Transactional을 표기해주지 않아도, em을 사용하는 메소드가 호출되고 종료 될 때마다, 매번 proxy 객체 내부의 실제 entityManager 객체가 변경되는 건가요?? 2-3) em.find(Member.class, 1L) 같은 조회성 질의에서@Transactional(readOnly=true) 와 아예 해당 어노테이션을 사용하지 않았을 경우의 결과가 동일하였습니다. 그렇다면 readOnly를 사용하는 이유가 대체 무엇인가요?.. 질문이 많아서 죄송합니다 ㅠㅠ 머리에 정리가 되질 않아서요..답변 부탁드립니다!!
-
미해결[개정판 2023-11-27] Spring Boot 3.x 를 이용한 RESTful Web Services 개발
강의 자료를 따로 제공하고 있나요?
PPT 자료를 제공하고 있다면 다운로드 받고 싶습니다.
-
미해결Kotlin으로 개발하는 Spring Boot Web MVC
@JsonNaming 과 @field:Pattern 이 함께 동작하지 않는 것 같습니다.
... @JsonNaming(PropertyNamingStrategies.SnakeCaseStrategy::class) data class UserRequest( ... @field:Pattern(regexp = "^\\\\d{2,3}-\\\\d{3,4}-\\\\d{4}\\\$") var phoneNumber:String?=null, )위와 같이 UserRequest 데이터클래스에서 @JsonNaming 과 @field:Pattern 을 동시에 사용하면 @JsonNaming 의 snake case 적용이 작동하지 않아 PUT 요청의 body 에 phoneNumber 로 요청해야만 정상 작동하고 phone_number 로 요청하면 400 에러가 나지만, 해당 필드에 @field:Pattern 대신 @field:Size 를 사용하면 @JsonNaming 에 기대하는대로 phone_number 로 요청해도 200 응답으로 정상작동 하는 현상을 겪고 있습니다. 왜 Validation 어노테이션을 바꾸었을 뿐인데 그와 상관없어보이는 @JsonNaming 의 작동 여부에 영향을 끼치는지 궁금합니다.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
강의 자료 오타 제보합니다.
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오) 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) 예[질문 내용]3. 회원 관리 예제 - 백엔드 개발.pdf5번째 페이지MemoryMemberRepositoryTest 클래스의 save() 메서드 부분이 이렇게 되어 있습니다. 마지막 줄이 수정이 필요해 보입니다.@Test public void save() { //given Member member = new Member(); member.setName("spring"); //when repository.save(member); //then Member result = repository.findById(member.getId()).get(); (result).isEqualTo(member); }
-
미해결토비의 스프링 부트 - 이해와 원리
ApplicationRunner 가 동작하지 않는 이유
테스트 환경에서는 application.properties를 읽지 않고 ApplicationRunner가 동작하지 않는다고 하셨습니다. 그래서 @TestPropertySource로 설정 파일을 넣어줬는데요 이게 동작하지 않는 이유는 테스트 환경은 스프링을 확장해서 스프링 컨테이너를 띄우고 구성 정보 클래스를 집어넣어서 빈 오브젝트만 등록하기 때문이 맞을까요 ? SpringApplication.run은 테스트 환경과 다르게 스프링 컨테이너를 띄우고 템플릿 매서드로 컨테이너를 띄우고 구성 정보 클래스를 활용해서 빈 오브젝트를 등록하는 거 외에 추가적인 Ruuner 나 Property 파일을 읽는 작업을 별도로 하기 때문인거죠 ?
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
윈도우 gradlew.bat build 에러 발생
C:\Users\Yoon>cd C:\Users\Yoon\Desktop\CS\SpringStudy\hello-spring C:\Users\Yoon\Desktop\CS\SpringStudy\hello-spring>gradlew.bat build FAILURE: Build failed with an exception. * What went wrong: 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.2.1. Required by: project : > org.springframework.boot:org.springframework.boot.gradle.plugin:3.2.1 > No matching variant of org.springframework.boot:spring-boot-gradle-plugin:3.2.1 was found. The consumer was configured to find a library for use during runtime, compatible with Java 8, packaged as a jar, and its dependencies declared externally, as well as attribute 'org.gradle.plugin.api-version' with value '8.5' but: - Variant 'apiElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'javadocElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, 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 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'mavenOptionalApiElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library, packaged as a jar, and its dependencies declared externally: - Incompatible because this component declares a component for use during compile-time, compatible with Java 17 and the consumer needed a component for use during runtime, compatible with Java 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'mavenOptionalRuntimeElements' capability org.springframework.boot:spring-boot-gradle-plugin-maven-optional:3.2.1 declares a library for use during runtime, 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 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'runtimeElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a library for use during runtime, 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 8 - Other compatible attribute: - Doesn't say anything about org.gradle.plugin.api-version (required '8.5') - Variant 'sourcesElements' capability org.springframework.boot:spring-boot-gradle-plugin:3.2.1 declares a component for use during runtime, 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 8) - Doesn't say anything about its elements (required them packaged as a jar) - Doesn't say anything about org.gradle.plugin.api-version (required '8.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. > Get more help at https://help.gradle.org. BUILD FAILED in 5s"빌드하고 실행하기" 강의에서 위 에러가 발생하였습니다.우선 저는 윈도우 사용자입니다.java --version으로 확인해봐도 Java 17버전이고, 설정 가능한 모든 부분에서 17버전으로 바꿨는데도 에러가 발생합니다. 파일 링크 : https://drive.google.com/file/d/1hnY1DJJ-9loR_mcQBum97NDgOErGgoMO/view?usp=drive_link
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
h2db에 입력후 localhost 조회시 안나옴
https://drive.google.com/file/d/1bWQeZq1FfiqL2cIEU7zJu-_Td0NSqGwF/view?usp=drive_link
-
미해결스프링부트 JUnit 테스트 - 시큐리티를 활용한 Bank 애플리케이션
안녕하세요 로그엔 성공적으로 들어온것같습니다..
안녕하세요 그전에 질문 올렸던 수강생입니다.. 이번에 로그엔 성공적으로 postman로 올린경우 된 것같은데 아래에는 error라고 뜨네여,,https://github.com/kimjeonggeon/bankapplication.gitbranch 2-bankApplication 입니다.
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
Transaction과 영속성 컨텍스트
안녕하세요. 강의 전반을 보고 영속성 컨텍스트에 대한 궁금증이 있어 이것 저것 테스트 해보다가 질문 남깁니다.기본적으로 Spring Data JPA에서 제공하는 영속성 컨텍스트는 1.Transaction 단위로 생성되는 것으로 이해하고 있었습니다.또한, 서로 다른 영속성 컨텍스트에 대해서 1차 캐시를 공유하지 않는것으로 알 고 있어, 서로 다른 2개의 @transaction에 대해서는 같은 값을 조회하더라도 동등성을 보장하지 않을것이라고 생각합니다.먼저, 위에 대한 제 생각이 맞는지 궁금합니다. 두 번째로 제가 직접 Application을 띄우고 하나의 http 요청에 대해 서로 다른 2개의 @transaction을 처리하는 로직을 넣고 서로 다른 @transaction에서 같은 값을 조회 후 동등성을 테스트 해봤는데 동등하다는 결과가 반복되었습니다. 이에 혹시 위에서 언급한 1.Transaction이 http 요청 단위의 transaction을 의미하는 것인가 라는 궁금증이 들었습니다. 위 2개 질문 이외 혹시 제가 놓치거나 잘못 이해한 부분이 있다면 알려주시길 바랍니다.감사합니다.
-
해결됨Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
prometheus image 실행 시 에러가 발생합니다.
2024-01-02 15:45:16 ts=2024-01-02T06:45:16.877Z caller=main.go:487 level=error msg="Error loading config (--config.file=/etc/prometheus/prometheus.yml)" file=/etc/prometheus/prometheus.yml err="open /etc/prometheus/prometheus.yml: operation not permitted어떻게 해결해야할까요...?
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
http://localhost:8080/ 접속 웹페이지 오류
질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]강의를 따라서 코드를 작성했습니다.http://localhost:8080/ 으로 접속하면 home.html 이 아니라 static 폴더의 index.html 이 열립니다. 어떻게 해결하면 될까요?
-
미해결실전! 스프링 데이터 JPA
1.프로젝트 환경설정 Test 설정
import 가 안됩니다.. import 문을 지우고 다시 해도 된다는 글이 있어서 따라해봤는데 그대로입니다.캐시비우기 및 재시작 해도 그대로고 gradle rebuild 해도 그대로 원인조차 파악하기 어렵습니다. 도움주십쇼.깃 링크:git@github.com:choiinsoochoi/jpa.git
-
미해결Spring Cloud로 개발하는 마이크로서비스 애플리케이션(MSA)
boot3 설정
spring boot3 에서 slueth를 사용할 수 없다고 합니다. 삽질 끝에 비슷하게 구현이 되긴 했는데 조금 다른 점 때문에 강사님이 의도하신바가 맞는지 정확히는 모르겠네요.첫 요청의 traceID와 spanID가 다른 점혹~시 필요하신분이 계시다면 참고해주세요!추가의존성 <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-actuator</artifactId> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-tracing-bridge-brave</artifactId> </dependency> <dependency> <groupId>io.zipkin.reporter2</groupId> <artifactId>zipkin-reporter-brave</artifactId> </dependency> <dependency> <groupId>io.micrometer</groupId> <artifactId>micrometer-registry-prometheus</artifactId> </dependency> <dependency> <groupId>io.github.openfeign</groupId> <artifactId>feign-micrometer</artifactId> </dependency>기존 스타터 sleuth, zipkin 의존성 제거yml 변경점server: port: 0 spring: application: name: order-service # spring boot 3.0 이전 zipkin, sleuth 설정 # zipkin: # base-url: http://127.0.0.1:9411 # enabled: true # sleuth: # sampler: # probability: 1.0 jpa: hibernate: ddl-auto: update h2: console: enabled: true settings: web-allow-others: true path: /h2-console datasource: driverClassName: org.h2.Driver url: jdbc:h2:mem:testdb ## 추가 cloud: openfeign: micrometer: enabled: true eureka: instance: instance-id: ${spring.cloud.client.hostname}:${spring.application.instance_id:${random.value}} client: register-with-eureka: true fetch-registry: true service-url: defaultZone: http://localhost:8761/eureka management: endpoint: health: show-details: always endpoints: web: exposure: include: refresh, health, beans, busrefresh, info, metrics, prometheus ## 추가 tracing: sampling: probability: 1.0 propagation: type: b3 zipkin: tracing: endpoint: http://localhost:9411/api/v2/spans logging: level: com.example.orderservice: DEBUG ## 추가 pattern: level: "%5p [%X{traceId:-},%X{spanId:-}]"추가 주석 부분만 추가Config Bean 추가@Configuration public class MoniterConfig { @Bean public Capability capability(final MeterRegistry registry) { return new MicrometerCapability(registry); } }이 Config 를 추가하지 않으시면, 요청 마다 TraceID가 달라집니다.액츄에이터도 필수 몇 가지 글을 참고하여 세팅한거라 몇몇 의존성이나 설정은 없어도 될수도 있지만 거의 필요한거 같습니다.그 외에 오류나 추적하는거는 동일하게 동작하는거 같습니다! 혹시 누군가 도움이 되시길!
-
해결됨Spring Boot JWT Tutorial
setAuthentication
안녕하세요JwtFilter 에서 StringUtils.hasText(jwt) && tokenProvider.validateToken(jwt)조건을 만족하면 아래와 같이 SecurityContextHolder.getContext().setAuthentication(authentication); 인증정보를 저장하는데 컨트롤러에서 또 인증정보를 저장하는건가요 ??정보를 그럼 총 2번 저장하는건가요??위 JwtFilter 에서 (StringUtils.hasText(jwt) && tokenProvider.validateToken(jwt)) 이조건이 만족했을떄
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
JdbcTemplateMemberRepository 에러
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]섹션 6 순수 JDBC강의 중 에러가 나서 질문 드립니다line 3에서 이런 오류가 나는데 왜 발생하는 건가요?line 3 을 주석 처리하고 실행하면 이런 오류가 뜨고 localhost로 접속 후 회원가입을 하면 Whitelabel Error PageThis application has no explicit mapping for /error, so you are seeing this as a fallback.Mon Jan 01 19:33:51 KST 2024There was an unexpected error (type=Internal Server Error, status=500). 이런 에러가 뜹니다