묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
해결됨비전공자도 따라하는 워드프레스 홈페이지 제작
로고 텍스트에 HOME 링크를 넣으면 밑줄이 생겨요
어떻게 없앨 수 있나요?
-
미해결실전! 스프링 부트와 JPA 활용1 - 웹 애플리케이션 개발
MemberRepositoryTest 빌드 오류
[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예)[질문 내용]MemberRepositoryTest의 testMember에서 에러가 발생합니다. 에러 내용이 너무 길어 프로젝트 링크 첨부하였습니다. https://drive.google.com/file/d/1flmRAYvWXnIY-1BNrdd76dXY6YdL-kHn/view?usp=sharing
-
미해결코딩 없이 랜딩페이지 만들어 사업 아이디어 테스트하기
수업자료 어디서 받나요?
랜딩페이지 부분에서 도움 되는 사이트가 나오고 링크로 막 들어가시는데 따로 저장하거나 필요할 때 들어가려고 하는데 이런 것은 정리가 안되어 있을까요?
-
해결됨Godot Engine 으로 시작하는 첫 게임 개발
자동차가 표시되지 않습니다.
안녕하세요. 강의를 따라 자동차 씬을 만들었습니다.게임 씬에 추가를 했는데요.자동차가 배경에 가려져서 안보이는 것 같습니다.ordring 옵션? 하고 관계가 있는 거 같은데 잘 모르겠네요. 자동차를 배치한 모습 실제 게임화면에서는 배경만 보입니다.
-
미해결
JwtToken 검증 시, 요청 헤더에 토큰 필드가 없는 경우
JwtToken 기반 인증을 수행할 때, 서버 측에서는 요청의 Authentication 필드로부터 토큰을 추출하고 검증하는데, 만약 요청에 토큰 필드 자체가 존재하지 않는 경우 어떻게 동작하나요?예를 들어, 사용자가 로그인을 진행하는 경우, 아직 토큰을 발급 받지 못한 상태인데, 이런 경우를 어떻게 처리해줘야 하는지 궁금합니다.만약 필드가 비어있는 경우 다음 필터로 넘어가는 방식으로 구현하게 된다면, 의도적으로 토큰을 필드에 추가하지 않고 요청을 전송하는 공격에 취약할 것 같습니다.이런 경우 각 동작(로그인 등)마다 토큰 인증을 수행할지, 수행하지 않을지 구분해줘야 하는 걸까요?감사합니다.
-
미해결BHPT - 호스트 기반 모의해킹 기초
안녕하세요~ BHPT 다음 강좌 관련하여 문의드립니다!
강의 들으며 정말 많이 배우고 있습니다! 감사합니다🙇🏻♂️ 강의에서 BHTP 다음 스텝을 밀씀주신 적이 있었는데 언제쯤 출시하실 계획이실지 궁금합니다!
-
미해결스프링부트 시큐리티 & JWT 강의
오류 문의 _ org.springframework.orm.jpa.JpaSystemException: could not deserialize
우선 도움 많이 받고 있습니다 1) 다름이 아니라 3강-시큐리티 회원 가입에서 동영상 강의 12분 10초까지는 제가 작성한 코드가 잘 실행 됩니다. 회원 가입한 데이터가 콘솔에 잘 출력 됩니다 2) 그리고 나서 데이터를 DB까지 잘 저장 하기 위해서 레지파토리를 작성 하여 회원 가입을 시도 했는데 아래와 같이 오류가 발생 합니다 3) 제 소견으로 저는 이미 마리아 DB랑 아래와 같이 설정 하여 사용 중에 있었습니다. 이게 문제인거 같기도 합니다 spring.application.name=FirstProject server.servlet.encoding.force-response=true spring.datasource.driver-class-name=org.mariadb.jdbc.Driver spring.datasource.url=jdbc:mariadb://localhost:3306/FirstProject?createDatabaseIfNotExist=true spring.datasource.username=root spring.datasource.password=1234 spring.jpa.hibernate.ddl-auto=update spring.jpa.properties.hibernate.format_sql=true spring.jpa.show-sql=true spring.jpa.open-in-view=true User(id=0, username=6, password=6, email=6@naver.com, role=null, createDate=null)Hibernate:insertintouser(create_date, email, password, role, username)values(current_timestamp(6), ?, ?, ?, ?)Hibernate:selectu1_0.create_datefromuser u1_0whereu1_0.id=?2024-08-02T21:41:49.880+09:00 ERROR 19076 --- [FirstProject] [io-8080-exec-10] o.a.c.c.C.[.[.[/].[dispatcherServlet] : Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed: org.springframework.orm.jpa.JpaSystemException: could not deserialize] with root cause 아래는 코드 내용 입니다 ~~~~~~~ package com.example.FirstProject.config; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; import org.springframework.security.config.annotation.web.builders.HttpSecurity; import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.security.web.SecurityFilterChain; @Configuration @EnableWebSecurity // 스프링 시큐리티 필터가 스프링 필터체인에 등록 public class SecurityConfig { // @Bean public BCryptPasswordEncoder encodePwd() { return new BCryptPasswordEncoder(); } @Bean public SecurityFilterChain filterChain(HttpSecurity http) throws Exception { http.csrf(csrf -> csrf.disable()); http.authorizeHttpRequests(authorize -> authorize .requestMatchers("/user/**").authenticated() .requestMatchers("/manager/**").hasAnyRole("ADMIN", "MANAGER") .requestMatchers("/admin/**").hasRole("ADMIN") .anyRequest().permitAll() ); http.formLogin(form -> form .loginPage("/loginForm")); return http.build(); } } package com.example.FirstProject.controller; import com.example.FirstProject.model.User; import com.example.FirstProject.repository.UserRepository; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder; import org.springframework.stereotype.Controller; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.ResponseBody; @Controller public class indexController { @Autowired private UserRepository userRepository; @Autowired private BCryptPasswordEncoder bCryptPasswordEncoder; // 아래는 http://localhost:8080/ 로 들어 왔을 때의 겟 맵핑 임 // http://localhost:8080/ 로 들어오면 index.mustache 페이지로 전환 됨 @GetMapping({"","/"}) public String index(){ return "/index"; } // href="/joinForm"가 들어오거나 URL 주소가 8080/joinForm로 들어오면 페이지는 return 값인 joinForm으로(mustache) 전환 해라 @GetMapping("/joinForm") public String joinForm(){ return "joinForm"; } @GetMapping("/loginForm") public String loginForm(){ return "loginForm"; } // 아래는 href="/user"가 타고 들어 오면 URL 주소는 8080/user 이 되면서 페이지는 return 값인 user로(mustache) 페이지가 전환 됨 @GetMapping("/user") public @ResponseBody String user(){ return "user"; } @GetMapping("/admin") public @ResponseBody String admin(){ return "admin"; } @PostMapping("/join") public @ResponseBody String join(User user){ System.out.println(user); user.setRole("ROLE_USER"); String rawPassword=user.getPassword(); String encPassword=bCryptPasswordEncoder.encode(rawPassword); user.setPassword(encPassword); userRepository.save(user); return "redirect:/loginForm"; } } package com.example.FirstProject.model; import jakarta.persistence.Entity; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; import lombok.Data; import org.hibernate.annotations.CreationTimestamp; import java.security.Timestamp; @Entity @Data public class User { @Id // primary key @GeneratedValue(strategy = GenerationType.IDENTITY) private int id; private String username; private String password; private String email; private String role; //ROLE_USER, ROLE_ADMIN @CreationTimestamp private Timestamp createDate; } package com.example.FirstProject.repository; import com.example.FirstProject.model.User; import org.springframework.data.jpa.repository.JpaRepository; // JpaRepository 를 상속하면 자동 컴포넌트 스캔됨. public interface UserRepository extends JpaRepository<User, Integer> { // Jpa Naming 전략 // SELECT * FROM user WHERE username = 1? // User findByUsername(String username); // SELECT * FROM user WHERE username = 1? AND password = 2? // User findByUsernameAndPassword(String username, String password); // @Query(value = "select * from user", nativeQuery = true) // User find마음대로(); }<!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>회원가입 페이지</title> </head> <body> <h1>회원가입 페이지</h1> <hr/> <form action="/join" method="post"> <input type="text" name="username" placeholder="Username"/> <br/> <input type="password" name="password" placeholder="Password"/> <br/> <input type="email" name="email" placeholder="Email"/> <br/> <button>회원가입</button> </form> </body> </html> <!DOCTYPE html> <html> <head> <meta charset="UTF-8"> <title>로그인 페이지</title> </head> <body> <h1>로그인 페이지</h1> <hr/> <!-- 시큐리티는 x-www-form-url-encoded 타입만 인식 --> <form action="/loginProc" method="post"> <input type="text" name="username" placeholder="Username"/> <br/> <input type="password" name="password" placeholder="Password"/> <br/> <input type="email" name="email" placeholder="Email"/> <br/> <button>로그인</button> </form> <a href="/joinForm">회원 가입 페이지 이동</a> </body> </html>
-
미해결10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
교안 질문 드립니다 memset()
큰돌님 안녕하세요. 오늘은 교안에 헷갈리는 부분을 들고 왔습니다. memset() 함수중에, memset은 -1, 0, 혹은 char?까지 된다는 말씀일까요 안된다는 말씀일까요?
-
해결됨10주완성 C++ 코딩테스트 | 알고리즘 코딩테스트
3-F질문있습니다
http://boj.kr/38e288735ce042b08b79f4830cc93119 결국 괄호 묶기는 3숫자 중에 연산 앞으로 2개 묶나 뒤로 2개묶나를 비교해서 더 큰연산을 가져오는 방식이라 생각해서 이렇게 진행했는데 틀렷다고 나옵니다. 어떤 부분에서 논리가 틀렸는지 궁금합니다
-
미해결카카오 퇴사자가 누설하는 [웹개발자 취업 비밀노트]
웹개발자 취업 비밀노트 노션 초대가 안되었습니다.
어제 오후 9시쯤 구글폼 작성한거같은데 아직까지 노션 공유 메일이 오지 않았습니다.haminsu5@gmail.com입니다!
-
미해결코드로 배우는 React 19 with 스프링부트 API서버
writer content
서버 쪽 이랑 이름이 다르면 데이터 바인딩이 안되지 않나요?
-
미해결[핵집] 2025 빅데이터 분석기사(필기)_과목 1~2
통합 강의안 요청
안녕하세요 통합 강의안 요청드립니다. res786@naver.com
-
미해결김영한의 실전 자바 - 중급 2편
collection 디렉토리 안에 map 포함
collection 인터페이스에 map 인터페이스가 속하지 않는다고 말씀해주셨는데 디렉토리를 collection에 만드신 이유가 있을까요? 검색해보니 Map을 컬렉션이라고 보기도 하지만 자바에선 컬렉션에 해당하지 않는다고 애매하게 나오네요...
-
미해결김영한의 실전 자바 - 고급 1편, 멀티스레드와 동시성
시분할은 Time Slicing이 아닌가요?
PPT에는 시분할이 Time Sharing이라고 표기되어있는데, '분할'이라는 표현에 'Sharing'이 붙어 뭔가 이상해 검색해보니 Time Slicing이라는 표현이 따로 있는 것 같더라고요. 다른 의도가 있어서 Time Slicing이라고 하신건가요?
-
미해결
How IT Professionals Can Train Their Dogs Using Smart Devices
In the fast-paced world of IT, balancing work responsibilities with pet care can be challenging. However, smart devices and technology can make it easier to train and manage your dog’s behavior. This guide explores how IT professionals can leverage technology to address common dog behavioral issues that appear in dog breeds effectively.1. Using Smart CollarsSmart collars are a fantastic tool for tracking your dog’s activity levels, location, and health metrics. These collars can also be used for training purposes.How to Use:Activity Tracking: Monitor your dog's daily exercise to ensure they are getting enough physical activity, which can help reduce behavioral problems like excessive barking and chewing.Training Alerts: Some smart collars come with features that allow you to send gentle vibrations or sounds to your dog, which can be used to reinforce training commands remotely.2. Interactive Pet CamerasInteractive pet cameras allow you to monitor and interact with your dog when you’re not home. They are particularly useful for addressing separation anxiety and ensuring your dog’s well-being.How to Use:Monitor Behavior: Keep an eye on your dog’s activities and behavior through live video feeds.Two-Way Communication: Talk to your dog through the camera to provide comfort and reduce anxiety.Treat Dispensing: Some cameras have treat-dispensing features, allowing you to reward your dog for good behavior even when you’re not home.3. Automated Feeders and Water DispensersEnsuring your dog has regular access to food and water is crucial, especially when you have a busy work schedule. Automated feeders and water dispensers can help maintain a consistent feeding routine.How to Use:Scheduled Feeding: Program the feeder to dispense food at regular intervals, ensuring your dog has a stable eating schedule.Portion Control: Use the feeder to control portion sizes, which is helpful for managing your dog’s weight and health.4. Smart ToysSmart toys can provide mental stimulation and entertainment for your dog, reducing boredom and destructive behaviors.How to Use:Puzzle Toys: Invest in interactive puzzle toys that challenge your dog’s problem-solving skills and keep them engaged.Automated Fetch Toys: These toys can keep your dog active and entertained by automatically launching balls for them to fetch.5. Training AppsThere are numerous training apps available that offer step-by-step guides, tips, and tricks for training your dog. These apps can be a valuable resource for IT professionals looking to efficiently train their pets.How to Use:Training Plans: Follow customized training plans that suit your dog’s breed, age, and behavior.Progress Tracking: Keep track of your dog’s progress and milestones through the app.Virtual Trainers: Some apps offer access to professional trainers for advice and support.6. Smart Home IntegrationIntegrating smart home devices can create a comfortable and safe environment for your dog. From automated lighting to temperature control, these devices can enhance your dog’s living space.How to Use:Automated Lighting: Use smart lights to ensure your dog is not left in the dark, which can cause anxiety.Temperature Control: Maintain a comfortable temperature in your home with smart thermostats, especially during extreme weather conditions.Security Systems: Use smart security systems to monitor your home and keep your dog safe from potential hazards.7. Emotional Support Animal (ESA) LettersFor those facing significant challenges with their dog's behavior or emotional well-being, considering an ESA letter might be beneficial. An ESA letter provides legal documentation that your dog serves as an emotional support animal, offering comfort and support in various situations.How to Use:Housing Benefits: An ESA letter can help you secure pet-friendly housing and avoid additional pet fees.Travel Accommodations: It can also make traveling with your dog easier, as airlines often accommodate ESAs differently.Emotional Support: For dogs with severe behavioral issues, an ESA letter acknowledges their role in providing emotional stability to their owner, which can be crucial in stressful environments.Training and managing your dog’s behavior can be seamlessly integrated into your tech-savvy lifestyle with the help of smart devices. From smart collars and interactive pet cameras to automated feeders and training apps, these tools can make a significant difference in your dog's behavior and well-being. Leveraging technology allows you to provide the best care for your furry friend, even with a busy IT schedule.FAQsHow can smart collars help with dog training?Smart collars can track your dog’s activity levels and health metrics, and some have features that allow you to send gentle vibrations or sounds to reinforce training commands remotely.What are the benefits of using interactive pet cameras?Interactive pet cameras allow you to monitor your dog’s behavior, communicate with them, and dispense treats remotely, which can help reduce separation anxiety and reinforce good behavior.How do automated feeders and water dispensers work?Automated feeders and water dispensers can be programmed to dispense food and water at regular intervals, ensuring your dog has a consistent feeding schedule and access to necessities even when you’re busy.What types of smart toys are available for dogs?There are various smart toys, including puzzle toys that challenge your dog’s problem-solving skills and automated fetch toys that keep them active and entertained.Can training apps replace professional dog trainers?While training apps provide valuable resources and guidance, they are best used as a supplement to professional training. Some apps do offer access to professional trainers for additional support.How can smart home devices improve my dog’s living environment?Smart home devices like automated lighting, temperature control, and security systems can create a comfortable and safe environment for your dog, reducing anxiety and enhancing their well-being.Are these smart devices suitable for all dog breeds?Yes, smart devices can be beneficial for all dog breeds. However, it’s essential to choose products that suit your dog’s specific needs, size, and behavior.
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
빈 연결 에러
Could not autowire. There is more than one bean of 'MemberRepository' type.Beans:memoryMemberRepository (MemoryMemberRepository.java) springDataJpaMemberRepository (SpringDataJpaMemberRepository.java)<스프링 데이터 JPA> 강의에서 테스트 코드를 실행 했을때 동일한 에러가 뜨는데 해결 방법을 찾지 못하고 있습니다. 도와주세요 ..동일한 타입의 빈이 중복 등록되어 발생한 문제임을 알고 있습니다. 어디서 중복 등록이 된 건지 찾지 못하고 있어요
-
미해결스프링 입문 - 코드로 배우는 스프링 부트, 웹 MVC, DB 접근 기술
application.properties
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]org.h2.Driver에서 오류가 발생하는데 이는 어떻게 수정해야하나요?
-
미해결React + GPT API로 AI회고록 서비스 개발 (원데이 클래스)
임폴트가 안됩니다
import React from 'react'; import Counter from './components/Counter'; // Counter 컴포넌트의 경로를 정확히 입력 function App() { return ( <> <Counter /> </> ); } export default App; 이런 오류가 뜹니다 버전이 달라서일까요?노드는 최신버전을 쓰고있습니다.
-
미해결스프링 DB 2편 - 데이터 접근 활용 기술
REQUIRES_NEW인데 rollback되는 이유가 궁금합니다.
@Service @RequiredArgsConstructor @Transactional public class UserService { public void createUser(CreateUserRequest request) { Users users = firebaseUsersRepository.findUsersByFirebaseUid(request.getFirebaseUid()) .orElseThrow(() -> new BusinessException("Not Found User", HttpStatus.INTERNAL_SERVER_ERROR)); User user = User.builder() .name(users.getDisplay_name()) .firebaseUid(request.getFirebaseUid()) .build(); userRepository.save(user); } } @Component @RequiredArgsConstructor @Transactional(propagation = Propagation.REQUIRES_NEW) public class BaseEntityAuditAware implements AuditorAware<User> { private final UserRepository userRepository; @Override public Optional<User> getCurrentAuditor() { try { return userRepository.findById(ApiLogger.getRequestCallerId()); } catch (Exception e) { return Optional.empty(); } } }createUser에서 userRepository.save(user)를 호출할때,JpaAudit기능을 이용하기 위해 구현해놓은 BaseEntityAuditAware에서 유저정보를 가져온 후, 실제 쿼리를 날립니다.이때, 전파속성이 REQUIRE_NEW이며, 발생한 모든 예외를 catch했으므로이 함수를 호출한 부모 함수로 해당 예외가 전달되지 않을 것이기때문에 rollback이 되지 않으리라 기대했지만실제로는 unexpectedrollbackexception이 발생하며 롤백이 되었습니다.null을 반환하는건 문제가 아닌것이,실제로 예외를 발생시키지 않으려고 위 코드를 아래와같이 변경하였더니 null값으로 정상적으로 insert쿼리가 날라갔습니다. @Override public Optional<User> getCurrentAuditor() { Long callerId = ApiLogger.getRequestCallerId(); if (callerId == null) return Optional.empty(); return userRepository.findById(ApiLogger.getRequestCallerId()); }어느부분이 잘못된것이며 제가 오개념을 잡고있는 부분이 어디일까요?
-
미해결스프링 핵심 원리 - 기본편
CoreApplication 실행 오류
=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]web 라이브러리를 build.gradle에 추가한 후 Core메서드를 실행했는데 위 사진처럼 오류가 뜨더라구요... 3.2.X부터 build tools를 인텔리제이가 아니라 gradle로 설정해서 동작하면 된다고 하셨던 것 같은데, 둘 다 바꿔서 실행했는데도 안되고 도저히 해결 방법을 모르겠네요... 보통 버전이 올라갈 때마다 하위 버전에서 실행됐던 것도 잘 동작하게 만들어야 하는 게 아닌가 답답하기도 하고 그래요ㅠㅠ