묻고 답해요
161만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결따라하며 배우는 노드, 리액트 시리즈 - 기본 강의
11,12 강의 중 Compare 관련 질문
도와주세요..ㅠ.ㅜ몇일째 들여다 보는데 진도가 안나갑니다...아래 캡쳐한 것과 같이 ComparePassword 를 만들었습니다.받아오는 password 와 DB password 가 같은데....isMatch가 false가 뜹니다.어떤 부분이 잘못되었는지 도움부탁드려요User 에 보면 password 도 잘 넘어 오는 것 같습니다.소스에 주석 단 부분 과 콘솔로그 다시 분리해서 올립니다. 몽고 db 에 보면 암호화 되서 잘 들어가있는 것 같습니다.
-
미해결3dsmax 모델링 고수의 비밀! (Modeling Expert Technique)
Ngon질문있습니다.
섭디 모델링 베이직 기본도형 제작 강의 도중Ngon에 extrude를 얹어서 도형을 제작하려하는데 Ngon위에 extrude를 얹으면 아예 사라져 버립니다. 어떻게 해결해야할까요..
-
해결됨실전! 코틀린과 스프링 부트로 도서관리 애플리케이션 개발하기 (Java 프로젝트 리팩토링)
AssertionsForInterfaceTypes.assertThat()
안녕하세요 강사님!자바에서는 assertj.core.api.Assertions.assertThat()을 많이 사용했었는데 강사님의 테스트코드에선 AssertionsForInterfaceTypes.assertThat()를 사용하시더라구요!혹시 AssertionsForInterfaceTypes.assertThat()를 사용하는 이유가 있을까요? 강의에서는 이와 관련된 내용이 나오지 않아 질문드립니다!
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
이 템플릿조각에서 사용하는것들이요
이것들은 보통 실무에서 프론트가 하는 역할인가요 백엔드가 해주는 역할인가요? 그냥 듣다보니 호기심이 생겨서 질문드립니다!
-
미해결이미지 관리 풀스택(feat. Node.js, React, MongoDB, AWS)
mime-types에서 jpg타입 저장이 안됩니다.
천천히 따라 하고 있는데 $사용시 함수 호출이 안되는것으로 확인됩니다.
-
미해결Do it! 자바 프로그래밍 입문 with 은종쌤
For문 (중첩된 반복문) 구구단 문의 드립니다.
안녕하세요.For문 구구단 코딩을 하다가 궁금한 점이 있어서 질문 드립니다. 구구단을 진행 하다가 문득 for 문에서 dan 과 times 두 개의 자리를 바꿔도 출력할 때에 내가 원하는 자리에 배치하면 똑같이 나오지 않을 까 싶었는데 4x1 이 아닌 1x4로 나오더라구요. 이유가 뭔지 알 수 있을까요?이렇게 시도를 하고 보니 자리가 정말 중요한 것 같습니다. 하지만 무슨 이유에서 저렇게 출력이 되는 건지는 알 수가 없어서 문의 드립니다.
-
미해결[개념은 호옹~, 실습 빡] 스프링 부트, 입문!
19강 Talend API POST 500 에러
안녕하세요. 강의듣던중 오류가 생겨서 코드 남깁니다. 인텔리제이에 코딩한건 아래와 같고, package com.example.firstproject.api; import com.example.firstproject.dto.ArticleForm; import com.example.firstproject.entity.Article; import com.example.firstproject.repository.ArticleRepository; import lombok.extern.slf4j.Slf4j; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.*; import java.util.List; @Slf4j @RestController //RestAPI용 컨트롤러. 데이터(JSON)을 반환 public class ArticleApiController { @Autowired //DI private ArticleRepository articleRepository; //GET @GetMapping("/api/articles") public List<Article> index() { return articleRepository.findAll(); } @GetMapping("/api/articles/{id}") public Article show(@PathVariable Long id) { return articleRepository.findById(id).orElse(null); } //POST @PostMapping("/api/articles") public Article create(@RequestBody ArticleForm dto) { Article article = dto.toEntity(); return articleRepository.save(article); } //PATCH @PatchMapping("/api/articles/{id}") public ResponseEntity<Article> update(@PathVariable Long id, @RequestBody ArticleForm dto) { // 1: DTO -> 엔티티 Article article = dto.toEntity(); log.info("id: {}, article: {}", id, article.toString()); // 2: 타겟 조회 Article target = articleRepository.findById(id).orElse(null); // 3: 잘못된 요청 처리 if (target == null || id != article.getId()) { // 400, 잘못된 요청 응답! log.info("잘못된 요청! id: {}, article: {}", id, article.toString()); return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(null); } // 4: 업데이트 및 정상 응답(200) target.patch(article); Article updated = articleRepository.save(target); return ResponseEntity.status(HttpStatus.OK).body(updated); } //DELETE @DeleteMapping("/api/articles/{id}") public ResponseEntity<Article> delete(@PathVariable Long id) { // 대상 찾기 Article target = articleRepository.findById(id).orElse(null); // 잘못된 요청 처리 if (target == null) { return ResponseEntity.status(HttpStatus.BAD_REQUEST).body(null); } // 대상 삭제 articleRepository.delete(target); return ResponseEntity.status(HttpStatus.OK).build(); } } package com.example.firstproject.entity; import lombok.AllArgsConstructor; import lombok.Getter; import lombok.NoArgsConstructor; import lombok.ToString; import javax.persistence.*; @Entity //DB가 해당 객체를 인식 가능 (해당 클래스로 테이블을 만든다) @AllArgsConstructor @NoArgsConstructor //디폴트 생성자를 추가 @ToString @Getter public class Article { @Id @GeneratedValue(strategy = GenerationType.IDENTITY)//DB가 ID를 자동 생성 private Long id; @Column private String title; @Column private String content; public void patch(Article article) { if (article.title != null) this.title = article.title; if (article.content != null) this.content = article.content; } } package com.example.firstproject.dto; import com.example.firstproject.entity.Article; import lombok.AllArgsConstructor; import lombok.NoArgsConstructor; import lombok.ToString; import javax.persistence.Entity; @NoArgsConstructor @AllArgsConstructor @ToString public class ArticleForm { private Long id; private String title; private String content; public Article toEntity() { return new Article( id, title, content); } } 인텔리제이 오류는 아래와 같고,org.h2.jdbc.JdbcSQLIntegrityConstraintViolationException: Unique index or primary key violation: "PRIMARY KEY ON PUBLIC.ARTICLE(ID) ( /* key:1 */ CAST(1 AS BIGINT), '1111', '1')"; SQL statement:insert into article (id, content, title) values (default, ?, ?) [23505-214] Talend API 오류는 아래와 같습니다.{"timestamp": "2022-11-01T12:34:19.732+00:00","status": 500,"error": "Internal Server Error","path": "/api/articles"}아래에는 캡처본 올립니다. 먼저 비슷한 질문 해주신 분 따라서 해봤는데 안되서 질문올립니다.
-
해결됨React 기반 Gatsby로 기술 블로그 개발하기
'[username]/[username].github.io' -> 'username/reponame'
자답
-
미해결누구나 할 수 있는 안드로이드 앱 개발 - 1 (Kotlin)
안드로이드 버전 문제로 컴파일 에러가 계속 발생합니다.
안녕하세요. ***누구나 할 수 있는 안드로이드 앱 개발 - 1 (Kotlin) 강의 동영상만 쭈욱 보고 직접해보려고 하니 다른 분 질문처럼 저도 button_one_name 에서 에러가 발생하여build.gradle (Module: ... app)에id 'kotlin-android-extensions'추가하여 어떻게 넣어갔는데 토스트 입력 후컴파일 하면 The 'kotlin-android-extensions' Gradle plugin is deprecated. Please use this migration guide (https://goo.gle/kotlin-android-extensions-deprecation) to start working with View Binding (https://developer.android.com/topic/libraries/view-binding) and the 'kotlin-parcelize' plugin.메세지 나오면서 더 이상 진행 되지 않습니다. ***누구나 할 수 있는 안드로이드 앱 개발 - 2 (Kotlin) 는 첫 강의부터 아래화면 처럼 선택 후 엔터치면 추가되지 않고 Class 'MainRvAdapter' is not abstract and does not implement abstract base class member public abstract fun onCreateViewHolder(parent: ViewGroup, viewType: Int): [Error type: Unresolved type for MainRvAdapter.Holder] defined in androidx.recyclerview.widget.RecyclerView.Adapter 이런 오류가 나옵니다. 누구나 할 수 있는 안드로이드 앱 개발 - 1 (Kotlin)와누구나 할 수 있는 안드로이드 앱 개발 - 2 (Kotlin)둘다 결재했는데 어떻게 해야하나요? ^^;
-
미해결스프링 시큐리티 OAuth2
질문있습니다
질문이 있어 글 남깁니다.해당 강의에서 authorizationEndpoint와 redirectionEndpoint를 커스텀하게 설정하는 방법을 배웠는데, 실무에서 이러한 api들을 커스텀하게 설정해서 요청 uri를 변경하는 경우가 실제로 생기나요?생긴다면 어떤 상황에서 사용되는지 알 수 있을까요?
-
미해결[리뉴얼] React로 NodeBird SNS 만들기
aws front 서버 문제
안녕하세요!섹션 6 프런트 서버 배포하기 과정중에 문제가 있어서 질문 올립니다.포트도 잘 바꾸었고, 백엔드 서버는 잘 돌아가는데 프런트 서버가 돌아가지 않습니다.문제가 무엇인지 모르겠네요 ㅠㅠfront에서 sudo npx pm2 monit을 하면 다음과 같이 Mem 부분이 이상한 문자로 뜨는데 이유를 모르겠습니다. 에러 로그 또한 뜨지 않아서 무슨 문제인지 정말 모르겠네요 ㅜㅜ백서버는 다음과 같이 잘 뜨는것을 확인할 수 있습니다.프런트 서버에 연결하면 다음과 같이 크롬에서 에러를 보여줍니다.
-
미해결[파이토치] 실전 인공지능으로 이어지는 딥러닝 - 기초부터 논문 구현까지
같은
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요.
-
미해결Three.js 3D 인터랙티브 바로 시작하기
Math.radians에 대해
안녕하세요 코딩일레븐님😊강의를 보다가 Math.radians를 따로 정의하시고 사용하시더라구요.Math.radians = (degrees) => { return (degrees * Math.PI) / 100; } Math 객체에 radians를 mutate해서 추가해주신 것 같은데혹시 이런 방식으로 추가하는 게 TypeScript에서도 가능할까요?
-
해결됨스프링 프레임워크는 내 손에 [스프1탄]
혹시 페이징 하는것도 다뤄주실수있을까요?
이번강의에 관한건 아니지만 페이징관련된것도 듣고 싶습니다!!
-
미해결설계독학맛비's 실전 Verilog HDL Season 1 (Clock부터 Internal Memory까지)
설치 마지막 단계가 안되네요,,,
- 강의 내용외의 개인 질문은 받지 않아요. (개인 과제, 영상과 다른 접근방법 후 디버깅 요청, 고민 상담 등..)- 저 포함, 다른 수강생 분들이 함께보는 공간입니다. 보기좋게 남겨주시면 좋은 QnA 문화가 될 것 같아요. (글쓰기는 현업에서 중요한 능력입니다!)- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 하루종일 강의 듣지도 못하고 설치만 여러번 반복 하니까 너무 지치고 하기도 싫네요주소도 맞게 입력 했는데 왜 install이 안되는걸까요?이번에 안되면 포기하렵니다...
-
해결됨블로그 자동화 프로그램 개발 강의 (파이썬 + 셀레니움)
13:53 배경음악이 키우시는 고양이 응아하는 소리인가요?ㅋㅋ
13:53 배경음악이 키우시는 고양이 응아하는 소리인가요?ㅋㅋ
-
미해결코딩테스트 실전 모의고사(with C++) : 대기업 대비
6강 3번 정사각형 그리키 코드 질문 드립니다.
안녕하세요 선생님의 코드 설명을 듣고 6강 3번 코드를 구현했습니다. 그리고 제가 코드를 구현한 것에 선생님의 코드를 참고하여 코드를 조금 수정했습니다.visual studio에서는 정상적으로 정답이 출력이 되는데, 채점 사이트에서는 계속 오류가 출력됩니다. 그래서 제가 모든 테스트를 visual studio에서 돌려봤는데, 모두 정답이 출력됨에도 채점 사이트에서는 예상치 못한 오답이 출력되거나, 아예 답이 출력되지 않는 문제가 생깁니다. 띄어쓰기가 없는 입력을 한글자씩 숫자로 받기 위해서 scanf("%1d", &board[i][j]) 를 사용했습니다. 제 생각에는 scanf를 사용해서 이런 문제가 발생한 것 같은데, 아무리 찾아봐도 이유를 모르겠습니다ㅠㅠ 왜 그런지 알 수 있을까요? 답변 부탁드립니다! 감사합니다. 아래는 제가 구현한 코드입니다. #include <bits/stdc++.h>using namespace std;int main() {ios_base::sync_with_stdio(false);freopen("input.txt", "rt", stdin);int n, m;cin >> n >> m;vector < vector <int> > board(n, vector <int>(m, 0));vector < vector <int> > dy(n, vector <int>(m, 0));vector <int> answer(min(n, m) + 5, 0); // 0번부터 사용, 0 만나면 break;for (int i = 0; i < n; i++) {for (int j = 0; j < m; j++) {scanf("%1d", &board[i][j]);if (board[i][j] == 0) continue; // 0이면 그냥 넘기기if (i >= 1 && j >= 1) { // 경계선 밖으로 나가지 않고, board[i][j]==1이라면dy[i][j] = min(dy[i - 1][j - 1], min(dy[i - 1][j], dy[i][j - 1])) + 1;}else { // i가 0이거나 j가 0일때는 i-1, j-1이 경계에서 벗어나므로 그대로 입력dy[i][j] = board[i][j];}}}for (int i = 0; i < n; i++) {for (int j = 0; j < m; j++) {for (int k = 1; k <= dy[i][j]; k++) { // k크기 이하인 정사각형 개수 세기answer[k]++;}}}for (int i = 1;; i++) {if (answer[i] == 0) break;cout << i << " " << answer[i] << endl;}return 0;}
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
messages.properties에서 한글 질문
이렇게 하면 돌아가고이렇게 한글로 적으면 실행이 안되는데어떻게 하면 한글로 적용이 될까요?
-
미해결실전 리액트 프로그래밍
useState 배열 비구조화 문법 질문!
안녕하세요const [count, setCount] = useState(0) 비구조화를 풀어쓰려면 useState를 쓰면 안되는 걸까요?예를 들어 const arr = [1,2,3] 있는데비구조화를 적용해보면 const [value, setValue] = arr 이런식으로 작성이 가능한데 useState를 쓰고도 비구조화를 풀어서 쓸 수 있는지 궁금합니다!
-
해결됨실전! 스프링 부트와 JPA 활용2 - API 개발과 성능 최적화
h2 테이블 생성이 안됩니다
질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]여기에 질문 내용을 남겨주세요. 안녕하세요 강의 잘 수강하고 있습니다.h2 디비를 사용하고 있는데,전에는 잘 되다가 갑자기 테이블이 생성이 되지 않습니다.18:44:52.704 [Thread-0] DEBUG org.springframework.boot.devtools.restart.classloader.RestartClassLoader - Created RestartClassLoader org.springframework.boot.devtools.restart.classloader.RestartClassLoader@29beb06e . ____ _ /\\ / ___'_ __ (_)_ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v2.7.4)2022-11-01 18:44:53.018 INFO 37580 --- [ restartedMain] jpabook.jpashop.JpashopApplication : Starting JpashopApplication using Java 17.0.4.1 on itaehwis-MacBook-Pro.local with PID 37580 (/Users/taehwi/Desktop/멋사/Recruit_Page/jpashop/build/classes/java/main started by taehwi in /Users/taehwi/Desktop/멋사/Recruit_Page/jpashop)2022-11-01 18:44:53.024 INFO 37580 --- [ restartedMain] jpabook.jpashop.JpashopApplication : No active profile set, falling back to 1 default profile: "default"2022-11-01 18:44:53.078 INFO 37580 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : Devtools property defaults active! Set 'spring.devtools.add-properties' to 'false' to disable2022-11-01 18:44:53.078 INFO 37580 --- [ restartedMain] .e.DevToolsPropertyDefaultsPostProcessor : For additional web related logging consider setting the 'logging.level.web' property to 'DEBUG'2022-11-01 18:44:53.979 INFO 37580 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Bootstrapping Spring Data JPA repositories in DEFAULT mode.2022-11-01 18:44:53.993 INFO 37580 --- [ restartedMain] .s.d.r.c.RepositoryConfigurationDelegate : Finished Spring Data repository scanning in 6 ms. Found 0 JPA repository interfaces.2022-11-01 18:44:54.368 INFO 37580 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port(s): 8080 (http)2022-11-01 18:44:54.374 INFO 37580 --- [ restartedMain] o.apache.catalina.core.StandardService : Starting service [Tomcat]2022-11-01 18:44:54.374 INFO 37580 --- [ restartedMain] org.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/9.0.65]2022-11-01 18:44:54.421 INFO 37580 --- [ restartedMain] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext2022-11-01 18:44:54.421 INFO 37580 --- [ restartedMain] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 1342 ms2022-11-01 18:44:54.478 INFO 37580 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Starting...2022-11-01 18:44:54.557 INFO 37580 --- [ restartedMain] com.zaxxer.hikari.HikariDataSource : HikariPool-1 - Start completed.2022-11-01 18:44:54.564 INFO 37580 --- [ restartedMain] o.s.b.a.h2.H2ConsoleAutoConfiguration : H2 console available at '/h2-console'. Database available at 'jdbc:h2:tcp://localhost/~/jpashop'2022-11-01 18:44:54.659 INFO 37580 --- [ restartedMain] o.hibernate.jpa.internal.util.LogHelper : HHH000204: Processing PersistenceUnitInfo [name: default]2022-11-01 18:44:54.697 INFO 37580 --- [ restartedMain] org.hibernate.Version : HHH000412: Hibernate ORM core version 5.6.11.Final2022-11-01 18:44:54.810 INFO 37580 --- [ restartedMain] o.hibernate.annotations.common.Version : HCANN000001: Hibernate Commons Annotations {5.1.2.Final}2022-11-01 18:44:54.881 INFO 37580 --- [ restartedMain] org.hibernate.dialect.Dialect : HHH000400: Using dialect: org.hibernate.dialect.H2Dialect2022-11-01 18:44:55.349 INFO 37580 --- [ restartedMain] o.h.e.t.j.p.i.JtaPlatformInitiator : HHH000490: Using JtaPlatform implementation: [org.hibernate.engine.transaction.jta.platform.internal.NoJtaPlatform]2022-11-01 18:44:55.355 INFO 37580 --- [ restartedMain] j.LocalContainerEntityManagerFactoryBean : Initialized JPA EntityManagerFactory for persistence unit 'default'2022-11-01 18:44:55.425 WARN 37580 --- [ restartedMain] JpaBaseConfiguration$JpaWebConfiguration : spring.jpa.open-in-view is enabled by default. Therefore, database queries may be performed during view rendering. Explicitly configure spring.jpa.open-in-view to disable this warning2022-11-01 18:44:55.520 INFO 37580 --- [ restartedMain] o.s.b.a.w.s.WelcomePageHandlerMapping : Adding welcome page: class path resource [static/index.html]2022-11-01 18:44:55.652 INFO 37580 --- [ restartedMain] o.s.b.d.a.OptionalLiveReloadServer : LiveReload server is running on port 357292022-11-01 18:44:55.677 INFO 37580 --- [ restartedMain] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port(s): 8080 (http) with context path ''2022-11-01 18:44:55.686 INFO 37580 --- [ restartedMain] jpabook.jpashop.JpashopApplication : Started JpashopApplication in 2.965 seconds (JVM running for 3.588) 이렇게 오류 없이 스프링이 돌아가는데, h2 화면에 들어가보면이런식으로 테이블이 하나도 생성이 안됩니다. 제 application.yml 코드입니다해결 부탁드립니다