inflearn logo
강의

강의

N
챌린지

챌린지

멘토링

멘토링

N
클립

클립

로드맵

로드맵

지식공유

묻고 답해요

176만명의 커뮤니티!! 함께 토론해봐요.

강의 코딩자료는 어디에 있나요?

미해결

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

강사님께서 강의 도중에 복사하시는 코딩 자료랑 강의노트는 어디서 다운로드 받을 수 있을까요? 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? (예/아니오) 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오) 3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오) [질문 내용] 여기에 질문 내용을 남겨주세요.

  • java
  • spring
  • mvc
  • spring-boot
wonyongick 댓글 2 좋아요 0 조회수 853

모든 개체가 필수적으로 참여하는 일대일관계

미해결

실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발

수업에서는 다양한 예시를 위해 주문과 배송 엔티티를 일대일 관계로 나눠서 만들었지만 db공부를 하던 중 "모든 개체가 일대일 관계에 필수적으로 참여하면 릴레이션을 하나로 합친다." 라는 것을 보았습니다. 위 글을 바탕으로 주문엔티티는 배송엔티티를 무조건 가지고 배송엔티티도 주문엔티티를 가지니 하나의 엔티티로 합치고 주문의 기본키와 배송의 기본키 두개를 합쳐 하나의 기본키로 만든다는 생각을 했습니다. 실무에서는 주문과 배송을 각각 나누어 설계하는지 아님 합쳐서 설계하는지 궁금합니다. 다시말해 1대1관계를 나눠서 설계하는지 궁금합니다.

  • java
  • spring
  • 웹앱
  • spring-boot
  • jpa
코딩먹는하마 댓글 1 좋아요 0 조회수 429

ajax 요청 응답에 대한 문의

미해결

스프링 시큐리티

안녕하세요 3) 인증 처리자 - AjaxAuthenticationProvider 수업에서 ajax 요청 날린 뒤 응답이 <Response Body is Empty>가 안뜨고, HTML 파일(정상적인 home 화면)이 응답되는 현상이 있습니다. https://github.com/kickhen/springsecuritypractice/tree/master 왜 저는 html이 리턴되는건지 무엇을 빼먹었는지 궁금합니다. 알려주시면 감사하겠습니다.

  • java
  • spring-boot
  • spring-security
taewoo_kim 댓글 2 좋아요 0 조회수 322

빌드후 실행하면 동작도 잘 되는데 종료하고 나면 오류메시지가 나오네요

미해결

스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술

Execution failed for task ':DcsSpringApplication.main()'. > Build cancelled while executing task ':DcsSpringApplication.main()' * 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. 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.2.1/userguide/command_line_interface.html#sec:command_line_warnings in the Gradle documentation. BUILD FAILED in 18s 3 actionable tasks: 1 executed, 2 up-to-date 라는 오류가 나오는데 무시해도 되는건가요?

  • java
  • spring
  • mvc
  • spring-boot
정규철 댓글 2 좋아요 0 조회수 1587

SecurityConfig에서 사용하는 빈 주입 방식 질문

해결됨

스프링 시큐리티

안녕하세요 3) 인증 처리자 - AjaxAuthenticationProvider 수업 듣던중 질문 남깁니다. SecurityConfig에서 어떤건 @Component로 빈 생성한 뒤에 Autowired로 주입받고(ex)CustomAuthenticationSuccessHandler ), 어떤건 @Component 안달고 직접 new 생성자 호출해서 @Bean 어노테이션으로 빈 등록을 하고 계시는데 (ex:CustomAuthenticationProvider 또는 FormAuthenticationProvider) 빈 주입하는 방식이 다른 이유가 궁금합니다. 일단 제가 해봤을 때 CustomAuthenticationProvider 에 @Component를 달면, SecurityConfig에 @Bean으로 등록한 PasswordEncoder 관련해서 빈 생성이 꼬이게 되는 것은 확인했는데요 단지, @Component를 달아보니까 꼬이더라 라는 이유를 넘어서서, SecurityConfig에서 사용하는 Bean을 주입하는 방식에 대해 구분하는 기준이 있다면 가르쳐주시면 감사하겠습니다.

  • java
  • spring-boot
  • spring-security
taewoo_kim 댓글 2 좋아요 0 조회수 406

user domain 생성관련

미해결

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

안녕하세요 선생님, 7강 유저 생성 에서 질문이 생겨 남깁니다. DTO에 User를 생성하는 클래스가 있는데 domain으로 따로 빼서 User클래스를 또 생성하는 이유는 무엇인가요? 스프링부트의 구조 짜는 법을 잘 모르고 있는건가 싶기도 하고..dto는 단순히 어떤 데이터로 통신할건지 정의만 해놓고 상세한 정의는 domain 의 user에서 하는 개념인건가요? 상세한 설명 부탁드리겠씁니다..!

  • java
  • spring
  • aws
  • mysql
  • spring-boot
  • jpa
lynn1602 댓글 1 좋아요 1 조회수 421

FilterSecurityInterceptor deprecated

미해결

스프링 시큐리티

- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. FilterSecurityInterceptor deprecated 가 돼서 AuthorizationFIlter 를 사용하라고 해서 @Bean 으로 등록하려고 했습니다. @Bean public AuthorizationFilter authorizationFilter() throws Exception { AuthorizationFilter filter = new AuthorizationFilter(authorizationManager(authenticationConfiguration)); filter.set } 여기서 setSeucirtyMetadataSource 같은 메서드가 없어서 어떻게 해야할지 잘 모르겠습니다...

  • java
  • spring-boot
  • spring-security
ak4686 댓글 1 좋아요 0 조회수 837

docker로 prometheus, grafana 사용하는 경우 설정 가이드

해결됨

스프링 부트 - 핵심 원리와 활용

prometheus.yml global: scrape_interval: 15s evaluation_interval: 15s alerting: alertmanagers: - static_configs: - targets: # - alertmanager:9093 rule_files: scrape_configs: - job_name: "docker" static_configs: - targets: ["localhost:9090"] #추가 - job_name: "spring-actuator" metrics_path: '/actuator/prometheus' scrape_interval: 1s static_configs: - targets: ['host.docker.internal:8080'] targets 을 localhost:8080 으로 하면 안됩니다. ㅠㅠ 참고: https://yoo-young.tistory.com/90 targets 을 localhost:8080 으로 하면 아래와 같은 결과가 나옵니다. 반드시 targets: [' host.docker.internal:8080 ']로 설정해 주세요! docker-compose.yml version: '3' services: grafana: image: grafana/grafana:latest container_name: grafana restart: always ports: - "3000:3000" volumes: - grafana-data:/var/lib/grafana - ./grafana/provisioning/:/etc/grafana/provisioning/ environment: - GF_SERVER_ROOT_URL=http://localhost:3000 - GF_SECURITY_ADMIN_PASSWORD=admin depends_on: - prometheus prometheus: image: prom/prometheus:latest container_name: prometheus restart: always ports: - "9090:9090" volumes: - ./prometheus/config:/etc/prometheus/ - prometheus-data:/prometheus command: - '--config.file=/etc/prometheus/prometheus.yml' - '--storage.tsdb.path=/prometheus' volumes: grafana-data: prometheus-data: 결과 http://localhost:9090/targets 감사합니다.

  • spring
  • spring-boot
  • prometheus
  • grafana
Dabi 댓글 2 좋아요 5 조회수 1877

Ajax 로그인 질문 있습니다

미해결

스프링 시큐리티

Ajax 로그인 시도 시 강사님과 다른 방식으로 응답이 오는데 정상적으로 작동한 것이 맞는지 궁금합니다.

  • java
  • spring-boot
  • spring-security
kimdudtj3070 댓글 1 좋아요 0 조회수 314

말해주신대로 코드를 수정한뒤 다시 git clone 했는데요

미해결

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

혹시 swap 설정은 clone 할떄 마다 해줘야하나요:?? 엄청느려져서요! 이런식으로 코드를 수정하였는데 엄청 속도가 느려져서 다음 url 로 접속이 안되네요 !

  • java
  • spring
  • aws
  • mysql
  • spring-boot
  • jpa
hoon 댓글 1 좋아요 0 조회수 350

application.yml 설정하는 곳에러입니다

미해결

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

제 뭐가문제일까요? 제 mysql은 docker에 깔려있습니다

  • java
  • spring
  • aws
  • mysql
  • spring-boot
  • jpa
달콤한 토끼 댓글 2 좋아요 0 조회수 445

mybatis 조회하기(7-2강) 실습시 오류가 발생합니다.

해결됨

스프링 부트 웹 개발 입문 - 따라하며 배우기

안녕하세요. 강의대로 실습한 후 실행시 오류가 발생해서 질문드립니다. 맥에서 실습중이기 때문에 하이디sql 사용이 불가하여 sequel pro로 대체하여 mariadb를 이용하고있는데, 이부분에서 연결이 잘못된 건지, 아니면 제가 실습을 따라가다 다른 실수가 있었던 건지 잘 모르겠습니다. 다른 분들께서 하신 질문들과 구글링 했을 때 제 생각에는 그래도 DB연결은 된 것 같은데 어떤 부분을 수정해야 할 지 도와주시면 감사하겠습니다. 오류 내용 : Invalid bound statement (not found): com.boot.sailing.v1.dao.MenuDao.doList [MenuCon] package com.boot.sailing.v1.controller; import com.boot.sailing.v1.service.MenuSvc; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.RequestMapping; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @Controller public class MenuCon { @Autowired MenuSvc menuSvc; @RequestMapping("/v1/menu") public String doMenu(Model model){ // Data 만들기 , List , Map List<Map<String, Object>> list = menuSvc.doList(); // Data 송부 model.addAttribute("list", list); model.addAttribute("hello", " ========== MenuCon ======== "); return "/v1/menu/menu"; } } [CoffeeMenu.xml] <?xml version="1.0" encoding="UTF-8" ?> <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "https://mybatis.org/dtd/mybatis-3-mapper.dtd"> <mapper namespace="com.boot.sailing.v1.dao.MenuDao"> <!-- 메뉴조회 --> <select id="doList" resultType="map"> SELECT no, coffee, kind, price, DATE_FORMAT(reg_day,"%Y, %m, %d") AS reg_day, DATE_FORMAT(mod_day,"%Y, %m, %d") AS mod_day FROM coffee_menu; </select> </mapper> [MenuSvc] package com.boot.sailing.v1.service; import com.boot.sailing.v1.dao.MenuDao; import lombok.extern.log4j.Log4j2; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; @Service @Log4j2 public class MenuSvc { @Autowired MenuDao menuDao; public MenuSvc() { log.info("================ MenuSvc , 생성자 ==================="); } public List<Map<String, Object>> doList(){ List<Map<String, Object>> list = menuDao.doList(); log.info(list); return list; } } [application.yaml] spring: datasource: driver-class-name: org.mariadb.jdbc.Driver url: jdbc:mariadb://localhost:3306/boot username: boot password: boot --- # Configuration mybatis mybatis: mapper-locations: classpath:sqlmapper/**/*.xml [MenuDao] package com.boot.sailing.v1.dao; import org.apache.ibatis.annotations.Mapper; import java.util.List; import java.util.Map; @Mapper public interface MenuDao { List<Map<String, Object>> doList(); }

  • spring
  • mvc
  • spring-boot
조윤지 댓글 1 좋아요 0 조회수 453

디스패처 서블릿과 스프링 컨테이너 연결 오류

미해결

스프링 부트 - 핵심 원리와 활용

학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요. 1. 강의 내용과 관련된 질문을 남겨주세요. 2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요. (자주 하는 질문 링크: https://bit.ly/3fX6ygx) 3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요. (질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG) 질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요. ========================================= [질문 템플릿] 1. 강의 내용과 관련된 질문인가요? 예 2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예 3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예 [질문 내용] 강의 내용대로 스프링 MVC 디스패처 서블릿을 생성한 후 스프링 컨테이너를 연결하려고 보니까 다음과 같이 오류가 뜹니다.

  • spring
  • spring-boot
  • prometheus
  • grafana
christinejung1010 댓글 3 좋아요 1 조회수 656

배포후 사이트에 접속은 되는데 이후 과정이 안됩니다.

미해결

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

위험한 컨텐츠라그런지 localhost 로 바뀌어버립니다. 어떻게 하면 이 사이트의 서비스를 이용할 수 있을까요? 다 허용으로 바꾸었는데도 그럽니다 ㅠㅠ ++보니까 제가 url에 일일이 넣어주면 이동이 되는데 아니면 local host 로 변경이 됩니다 이유가 뭘까요> ㅠㅠ

  • java
  • spring
  • aws
  • mysql
  • spring-boot
  • jpa
hoon 댓글 1 좋아요 0 조회수 496

예제 프로젝트 상에서의 Kafka 사용시 궁금한점

미해결

실습으로 배우는 선착순 이벤트 시스템

강의 잘 듣고 있습니다. 질문사항이 두개 있습니다. 1. 4강의 [문제점] 영상에서 쿠폰생성 10000개 요청으로 인해 mysql이 1분에 100개의 insert가 가능하다고 가정할 시 '주문생성/회원가입요청이 타임아웃 또는 10분뒤에 실행' 된다고 하셨는데요. 예제로 사용하신 Kafka 사용 예제에서는 Consumer 프로젝트도 어차피 API프로젝트와 같은 DB 를 바라보고 있으므로, 어차피 Kafka를 사용하여도 '주문생성/회원가입요청이 타임아웃 또는 10분뒤에 실행'되지 않나요? 왜 여쭤보냐면, 강의 내에서 Kafka 미사용시 주문생성/회원가입요청의 타임아웃 및 10분뒤 실행에 대한 해결책을 Kafka로 사용하셔서 문의드립니다. 2. 5강의 [Consumer 사용하기] 영상을 보면 API 프로젝트 Consumer 프로젝트가 별개로 존재합니다. 그러므로 API프로젝트의 테스트 케이스가 종료되어도 Consumer 프로젝트는 이미 Kafka로 100개의 데이터가 스트림으로 들어오는 상태이므로, 테스트케이스가 종료 되어도(즉, API프로젝트가 종료되어도) Cunsumer 프로젝트는 종료가 되지 않은 상태 이므로 100개의 쿠폰이 DB에 생성 이 되어야 하는게 아닌지요? 왜 여쭤보냐면, 강의 내에서는 API프로젝트가 종료되면 Consumer 프로젝트도 작업이 멈추는 현상이 있어서 문의드립니다.

  • java
  • docker
  • spring-boot
  • kafka
  • redis
김동건 댓글 2 좋아요 1 조회수 895

error: cannot find symbol @Entity ^ symbol: class Entity

미해결

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

애플리케이션을 처음 실행하고 여러 파일에서 위 제목과 같은 오류가 납니다. 한 파일이 아니라 여러 파일에 걸쳐가며 저렇게 발생하는데 어떻게 해결해야 하나요?

  • java
  • spring
  • aws
  • mysql
  • spring-boot
  • jpa
lynn1602 댓글 1 좋아요 1 조회수 533

스프링부트 버전관련 질문

미해결

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

안녕하세요 멘토님! 프로젝트앱을 다운받아 열었더니 빌드후에 다음과 같이 오류가 나타납니다.. 전에 프로젝트를 3.xx버전으로 했어서 이 경우에 java 17이상만 가능하기 때문에 java11을 사용하지 못해 나는 오류인것 같은데 어떻게 진행하면 될까요? 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 8, 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 8 - 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 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 '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 8 - 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 8 - 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 8 - 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 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 '7.5')

  • java
  • spring
  • aws
  • mysql
  • spring-boot
  • jpa
lynn1602 댓글 1 좋아요 1 조회수 554

제 mysql 이 적용이 안되는 이유를 알아냈습니다.

미해결

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

연결이 위험하다면서 자꾸 제 local로 바뀌네요 전 여기서 해결하고싶은데 ... 어떻게 하면 다음페이지인 인덱스들도 접속 가능하게 할까요?? 그 url에서 http://localhost:8081/start.html 이런식으로 url 이 변경되며 화면이 전환되는 스타일인데 그게 안됩니다 ㅠㅠ

  • java
  • spring
  • aws
  • mysql
  • spring-boot
  • jpa
hoon 댓글 1 좋아요 0 조회수 301

메서드명 컬러의 의미

해결됨

자바와 스프링 부트로 생애 최초 서버 만들기, 누구나 쉽게 개발부터 배포까지! [서버 개발 올인원 패키지]

강사님 화면을 보면 addTwoNumbers, multiplyTwoNumbers 같은 메서드명 (메서드가 맞나요.. 제가 자바가 아직 서툴러서😅) 이 노란색으로 표시되는데 저는 회색으로 표시됩니다. 이거 글자 색에 어떤 의미가 따로 있나요? 그리고 터미널에도 강사님은 INFO나 WARN 같은 글자들이 컬러로 표시되는데 저는 그냥 다 하얗게 보여서요. 강사님과 똑같이 세팅하려면 어떻게 해야 하나요? 검색해서 settings에 있는 semantic highlighting 적용해 봤는데 똑같이 안되는 거 같아요

  • java
  • spring
  • aws
  • mysql
  • spring-boot
  • jpa
alice 댓글 1 좋아요 1 조회수 422

랜덤 포트를 사용하는 이유

미해결

실전! 스프링부트 상품-주문 API 개발로 알아보는 TDD

안녕하세요! 너무 좋은 강의 잘 보고 있습니다. 감사합니다! 강의를 듣다가 궁금한 것이 생겼는데, 굳이 ApiTest 라는 클래스를 따로 만들어서 랜덤 포트로 설정해준 이유는 무엇인가요?? 감사합니다.

  • tdd
  • spring-boot
  • pojo
  • 소프트웨어-테스트
  • api
도도도영 댓글 1 좋아요 0 조회수 1150

인기 태그

인프런 TOP Writers

주간 인기글