묻고 답해요
164만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
JPQL 로 작성한 문법 테스트 코드로 작성해 볼 수 있을까요?
안녕하세요. JPQL 로 쿼리를 작성하고 실제 데이터가 들어가는지 보려고 합니다. 우선, main 함수에서 직접 넣는거는 되는 것을 확인했습니다. 그리고 제가 해보고 싶었던거는 테스트 코드로 작성해보는 것이였습니다. 그런데 Bean을 못찾는다는 에러가 발생했습니다. 구글링도 해보고 빈 등록을 다양하게 해보면서 접근법을 다르게도 해봤는데 해결이 안되네요 ㅠㅠ 혹시 제 코드를 보시고 어디에 문제가 있는지 알 수 있을까요? 제가 작성한 코드입니다. [ JPQLRepository ] @Transactional @Repository public class JPQLMemberRepository implements MemberRepository{ @PersistenceContext private final EntityManager em; @Autowired public JPQLMemberRepository(EntityManager em) { this.em = em; } public EntityTransaction getTx() { return em.getTransaction(); } public Member save(Member member) { em.persist(member); return member; } public void emClose() { em.close(); } @Override public Optional<Member> findByid(Long id) { return Optional.empty(); } @Override public Optional<Member> findByname(String name) { List<Member> result = em.createQuery( "SELECT m FROM Member m WHERE m.name = :name", Member.class ).setParameter("name", name).getResultList(); System.out.println("--------------------------------"); for (Member i : result) { System.out.println("member:" + i); } System.out.println("--------------------------------"); return result.stream().findAny(); } } [ SpringConfig ] @Configuration public class SpringConfig { @Bean public EntityManagerFactory getEnf() { EntityManagerFactory emf = Persistence.createEntityManagerFactory("5xik"); return emf; } @Bean public EntityManager getEm() { return getEnf().createEntityManager(); } @Bean public MemberRepository memberRepository() { return new JPQLMemberRepository(getEm()); } } [ TestCode ] @SpringBootTest @Transactional class JPQLMemberRepositoryTest { AnnotationConfigApplicationContext ac = new AnnotationConfigApplicationContext(SpringConfig.class); MemberRepository repository = ac.getBean("memberRepository",JPQLMemberRepository.class); EntityTransaction tx = repository.getTx(); @Test @Commit void insertData() { tx.begin(); try{ Member member = new Member(); member.setName("sungjun"); member.setPhonenumber("010"); repository.save(member); Optional<Member> result = repository.findByname(member.getName()); Assertions.assertThat(result).isEqualTo(member); tx.commit(); } catch (Exception e){ tx.rollback(); } finally { //repository.emClose(); } //ac.close(); } } 그리고 아직 close를 하는 부분은 구현을 안해놔서주석처리를 해놨습니다 !감사합니다.
-
미해결
Golden Goose Sale has more than plenty of
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이The versatile forward came from unassuming beginnings, describing himself as a player who didn't take basketball too seriously until he was older, developing a supportive relationship with his mother along the way. While Deon Point, Concepts Creative Director, wanted to continue investigation of Egyptian mythology with the Kyrie 6, he also made a conscious decision to maintain an open narrative. 2022, though, seems to be a return to form, as Jordan Brand alone Golden Goose Sale has more than plenty of releases to look forward to. 2022 is already off to quite the start, and there's plenty more to look forward to just months down the road. He's had an impact on my life that no one's ever had, and probably no one ever will have again. He taught me to ask myself, 'What am I doing here if I'm not trying to be the best at it' That not just a basketball quote. The sneakers originally retailed for $110 USD and were designed by Tinker Hatfield. The Air Jordan 4 IV is the fourth signature sneaker designed for Chicago Bulls legend Michael Jordan. They appealed to beasts and hypebeasts alike. A lot of people don't understand, but being an undocumented person like myself, we www.goldens-gooses.com struggle a lot...and this scholarship has given me an opportunity that no one else would've given me, says Rodolfo Castillo, an incoming scholar who learned of his scholarship at the Jordan Brand Classic. The aforementioned red black colorway was later dubbed the Flu Game by sneaker heads; it was the color that Jordan wore during Game 5 of the 1997 NBA Finals on June 11th. Designers added 15 percent more Nike ZoomX foam capable of providing up to 85 percent energy return to the Nike ZoomX Vaporfly NEXT - but the shoe's weight stays the same as the previous version.용해주세요.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
memberService 오류가 안 나는데 상관없나요?
영상에서는 memberService 부분이 오류가 뜨는데 저는 처음 생성자를 만들 때부터 빨간 줄이 없습니다 제가 다른 부분에서 잘못 작성한게 있는건가요?
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
x, y 질문
보통 수학을 풀 때, (x, y)로 문제를 푸는데, 강사님께서 (y, x)로 설정을 하시는 이유가 따로 있을까요?
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
required type에 에러가 뜹니다 ㅠ
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용] SpringConfig 파일 작업중 그대로 따라하고 있었는데 다음과 같은 오류가 떴습니다 ㅠ
-
미해결반응형 웹사이트 포트폴리오(Architecture Agency)
모바일 화면에서 hiring의 sns 문제-hiring.html 소스 올려 놓았습니다.
hiring.html 소스로 올려 놓았습니다. 제 소스에서 sns 클래스에 바로 sns 도메인 주소로 가도록 했는데.. 강사님 처럼 #none으로 해도 모바일 화면에서는 컬러색이 적용이 안됩니다. 참 그리고 페북과 트위터는 도메인주소로 했을때 접속이 안되는데.. 왜 차단이 되는건지도 설명해 주시면 감사하겠습니다. hiring.html: <!DOCTYPE html> <html lang="ko"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, user-scalable=yes, initial-scale=1.0"> <title>bizpage-subpage_hiring</title> <link rel="stylesheet" href="style.css"> <link rel="stylesheet" href="responsive.css"> </head> <body> <div class="modal"> <div class="header"> <div class="header-inner"> <div class="modal-display">+Hiring</div> </div> </div> <div class="hiring-main"> <div class="hiring-heading"> <span>hiring</span> <h1>Come work with us</h1> </div> </div> <article class="hiring-info"> <div class="center-parent"> <div class="center-child"> <h2>Together we can make an impact</h2> <p>bizpage offers the excitement of an entrepreneurial environment with the stability of an established practice. Principals and senior leadership work side-by-side with junior designers to create innovative, workable designs. With our global practice, we are currently creating the next generation of healthy, experience-based urban neighborhoods and resorts.</p> </div> </div> <div class="photo"><img src="images/hiring-main-01-01.jpg"></div> </article> <article class="hiring-slogan"> <p> Every summer we offer a Fellowship to a select group of students in architecture, planning and landscape architecture. Read about our 2019 Fellowship winners and learn more about what the Fellowship has to offer. </p> </article> <article class="hiring-info"> <div class="photo"><img src="images/hiring-main-01-02.jpg"></div> <div class="center-parent"> <div class="center-child"> <h2>We’re always looking for talent</h2> <p>If you don’t see an open position that fits your talents, send us your resume. We’re always looking for smart, self-starters and will reach out to you if something becomes available.</p> <div class="hiring-contact"> <ul> <li>SEOUL</li> <li>OY Kang</li> <li>+82-10-3687-4054</li> <li>oykang@bizpagecorp.com</li> </ul> <ul> <li>Hanam-si</li> <li>Daniel Kang</li> <li>+82-31-425-3336</li> <li>daniel_kang@bizpagecorp.com</li> </ul> </div> <div class="sns"> <a href="https://facebook.com/" target="_blank"><i class="fa fa-facebook"></i></a> <a href="https://twitter.com/" target="_blank"><i class="fa fa-twitter"></i></a> <a href="https://linkedin.com/" target="_blank"><i class="fa fa-linkedin"></i></a> <a href="https://instagram.com/" target="_blank"><i class="fa fa-instagram"></i></a> <a href="https://youtube.com/" target="_blank"><i class="fa fa-youtube-play"></i></a> <a href="https://bizpagecorp.com/contact" target="_blank"><i class="fa fa-envelope-o"></i></a> </div> </div> </div> </article> </div> </body> </html>
-
미해결스프링 핵심 원리 - 고급편
`..` 다음에 *.*을 하는 이유
안녕하세요. 코드를 따라치다가 한 가지 궁금한 점이 있습니다. 이전에 배우기로는 `..`는 하위 패키지를 포함하는 걸로 알고 있습니다. @Before("execution(* hello.aop.internalcall..*.*(..))") 위 코드 대신에 @Before("execution(* hello.aop.internalcall..*(..))") 이렇게만 만해도 충분하지 않나요? 1번처럼 작성하신 이유가 궁금합니다.
-
미해결
Travis Scott x Nike Shoes Run Star Hike for
Elsewhere, though, the dark green shade takes the stage, dyeing not just the overlays but also the lining and tread. Why now Why this shoe Then the answers start flowing. The first Air Jordan shoe, now known as the Jordan 1, released in 1985 after being debuted by Michael Jordan in the previous year. Two approaches are taken The first, a High, reforms past considerations including AF1 Duck Boot tooling and adds a new twist with a customizable, zippered bootie. If you caught the Jordan Fall 2022 release preview, you would've caught the confirmed release of the Air Jordan 1 Yellow Toe, the latest in the popular series of AJ1s with the popular color-blocking with the original www.travisscottshoes.com Black Toe flavor. During my last year in Philadelphia, we had Tuxedos and Tennies night at the Spectrum. For generations, the cumulative impact of systemic racism has had a defining impact on the opportunities available to Black communities. He taught me to ask myself, 'What am I doing here if I'm not trying to be the best at it' That not just a basketball quote. With a suite of playoff performances under LeBron's belt, the storybook intrigue of the Soldier line grew. The Soldier IV continued the line's entry into team colorways. The graphic, featuring jagged mountains that transition into free-flowing summits, unites the Chuck 70, Chuck Taylor All Star in high, low top and platform versions, a new slide, as well as the Travis Scott x Nike Shoes Run Star Hike for the first time. During my last year in Philadelphia, we had Tuxedos and Tennies night at the Spectrum.
-
미해결자바스크립트 알고리즘 문제풀이 입문(코딩테스트 대비)
변수 선언 관련
안녕하세요 선생님! 변수 선언 관련해서 궁금증이 생겨 질문 남깁니다. answer의 경우 let을 통해 변수를 선언해주었고, i,j,k,s,pi,pj 또한 let으로 선언하였는데 cnt나 ,m,n의 경우const,let 등의 키워드를 안쓰신 이유가 궁금합니다
-
미해결배달앱 클론코딩 [with React Native]
에러 발생
import React, { useState } from 'react'; import {Pressable, Text, View} from 'react-native'; function Settings() { const [count, setCount] = useState( initialState 1); return ( <View> <Pressable onPress={ () => setCount( value: p => p + 1 )}> <Text>{count}</Text> </Pressable> </View> } export default Settings; 강의 보고 그대로 작성했는데 initialState와 Pressable 부분에서 setCount 내부 화살표 함수 작성시 아래에 위치한 닫는 Pressable과 View에서 받지 못하는 가 빨간 줄 뜨면서 에러가 뜹니다.
-
해결됨네트워크, 그림으로 이해하자(2022ver.)
결제수단 변경으로 질문드립니다.
어디에 남겨야 보실 수 있는지 모르겠어서 부득이하게 이곳에 질문드립니다. 삭제 요청하시면 바로 삭제하겠습니다 07/12일에 결제했는데 회사에서 교육 지원이 가능하다고 하여 결제한 카드를 변경하고 싶은데 이미 시간이 지났고 학습자료도 다운 받은 상태라서 결제수단을 변경할 수 있을까요? - 재결제 후 기존 카드결제를 환불하거나 이런식으로요
-
미해결대세는 쿠버네티스 (초급~중급편)
mobaxterm master 접속 오류
회사 환경때문에 핸드폰 USB 테더링으로 인터넷 접속해서 하고있습니다. 제목과 같이 mobaxterm master ip를 192.168.68.xx 대역으로 했는데 핑이 아예 되질 않네요 ㅜㅜ 참고로 USB ip는 아래와 같습니다. (SAMSUNG Mobile USB Remote NDIS Network Device #2 IPv4 주소 : 192.168.68.1xx(기본 설정)) usb테더링 환경에서는 같은 ip대역에서 다른 ip주소로 접속이 불가한가요..?? ㅠㅠ
-
미해결자바 ORM 표준 JPA 프로그래밍 - 기본편
17분25초쯤
mappedby="team" 아래에 있는 members랑 addMember메서드 아래에있는 members 둘이 서로 같은데 그전에 team.getMembers().add(member);를 할때 getMembers에서 members가 mappedby 읽기전용이라서 안된다고 하셨는데 그러면 addMember메서드에 있는 members도 읽기전용이라 add를 할때 적용이 안돼야 하는거 아닌가요?
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part1: C# 기초 프로그래밍 입문
TextRPG2 만들기중 디버깅 오류에 대한 질문있습니다
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 특별한오류가 없는데 이렇게 실행되는 이유가 궁금합니다
-
해결됨스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
빌드하고 실행하기 강의(dir gradlew.bat 실행 후 gradlew build
완료된건지 궁금합니다.. 그리고 강의자료에 Git bash 터미널 사용하기 내용을 진행하지 않으면 남은 강의 실습에 차질이 생기나요?
-
미해결C# Xamarin Forms 자마린 폼즈 API 강의 + 간단한 API 만들기
쿼리문은 어떻게 써야할까요?
강의를 전부 듣고 제가 원하는 방향으로 수정하고있습니다 DB에서 원하는 조건으로 설정하여 테이블에 있는 값을 가져오고 싶은데 인터넷에 검색하니 서버랑 DB명 입력하고 로그인 비밀번호까지 입력해서 연동을 하라고 하는데 잘 안되네요 window 인증이 기본인데 로그인 서버를 새로 추가해야만 할까요? 몇번 시도해봤지만 잘 되지 않습니다 웹이 아닌 자체 연동을 해야만 원하는 조건으로 데이터를 뽑아올수 있을까요? 예를 들면 입사일이 2022년 미만인 사원의 이름만 뽑아온다던지..
-
미해결자바(Java) 알고리즘 문제풀이 입문: 코딩테스트 대비
질문드립니다!
안녕하세요! 강의 정말 잘 수강하고있습니다. 다름이 아니라 해쉬맵 강의 중 3번 매출액의 종류 부분에서 어떠한 생각으로 인해 k-1로 접근하는 지 모르겠습니다. 발상의 과정과 이유가 궁금합니다!(과정이 너무 궁금)
-
미해결비트코인 선물거래 자동매매 시스템(저자직강)
안녕하세요
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문호의는 1:1 문의하기를 이용해주세요. 안녕하세요! 혹시 개인교습을 받을 수 있는 방법이 있을까용?
-
해결됨Svelte.js SPA 영화 검색 프로젝트
안녕하세요 Vite + Svelte로 프로젝트 시작하려고하는데 prettier + eslint 설정이 잘 안되고 있습니당
안녕하세요 Vite + Svelte로 프로젝트 시작하려고하는데 prettier + eslint 설정이 잘 안되고 있습니다 ㅠㅠ https://github.com/sveltejs/prettier-plugin-svelte#readme 이곳에 가서 prettier 설정하는거 보고 dependency 설치 후 .prettierrc 파일을 root directory에 만들어서 하는데 .svelte file에게만 prettier rules가 적용이 안되고 있습니다. 무슨 영문인지 도대체 모르겠습니다. 미리 답변 감사 드립니다!
-
미해결Vue.js 완벽 가이드 - 실습과 리팩토링으로 배우는 실전 개념
권한요청 드립니다.
인프런 아이디 : dev인프런 이메일 : dev@morning-coffee.co.kr 깃헙 아이디 : e_1240@morning-coffee.co.kr깃헙 Username : shingiyoung