묻고 답해요
158만명의 커뮤니티!! 함께 토론해봐요.
인프런 TOP Writers
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
18:06 로그인을 하려도 리다이렉트가 안되는데 이유가 있나요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? (예/아니오)2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? (예/아니오)3. 질문 잘하기 메뉴얼을 읽어보셨나요? (예/아니오)[질문 내용]체크필터 코드 입니다.package hello.login.web.filter; import hello.login.web.session.SessionConst; import lombok.extern.slf4j.Slf4j; import org.springframework.util.PatternMatchUtils; import javax.servlet.*; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; import java.io.IOException; @Slf4j public class LoginCheckFilter implements Filter { private static final String[] whitelist = {"/", "/members/add", "/login", "/logout", "/css/*"}; @Override public void doFilter( ServletRequest request, ServletResponse response, FilterChain chain) throws IOException, ServletException { HttpServletRequest httpRequest = (HttpServletRequest) request; String requestURI = httpRequest.getRequestURI(); HttpServletResponse httpResponse = (HttpServletResponse) response; try{ log.info("인증체크 필터 시작 {}", requestURI); if(isLoginCheckPath(requestURI)){ log.info("인증 체크 로직 실행 {}", requestURI); HttpSession session = httpRequest.getSession(false); if(session == null || session.getAttribute(SessionConst.LOGIN_MEMBER) == null){ log.info("미인증 사용자 요청 {}", requestURI); // 로그인 페이지로 리다이렉트 httpResponse.sendRedirect("/login?RedirectURL=" +requestURI); return; } } chain.doFilter(request, response); }catch (Exception e){ throw e; // 예외를 로길 가능 하지만, 톰캣까지 예외를 보내주어야 한다. }finally { log.info("인증 체크 필터 종료"); } } /** * 화이트 리스트의 경우 인증체크 필요 없음 */ // private boolean isLoginCheckPath(String requestURI){ // for (String s : whitelist) { // if (requestURI.equals(s)){ // return false; // } // } // return true; // return !PatternMatchUtils.simpleMatch(whitelist, requestURI); // } /** * 화이트 리스트의 경우 인증 체크X */ private boolean isLoginCheckPath(String requestURI) { return !PatternMatchUtils.simpleMatch(whitelist, requestURI); } } 컨트롤러 코드 입니다.package hello.login.web.login; import hello.login.domain.login.LoginService; import hello.login.domain.member.Member; import hello.login.web.session.SessionConst; import hello.login.web.session.SessionManager; import lombok.RequiredArgsConstructor; import lombok.extern.slf4j.Slf4j; import org.springframework.boot.web.servlet.server.Session; import org.springframework.stereotype.Controller; import org.springframework.validation.BindingResult; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.RequestParam; import javax.servlet.http.Cookie; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpSession; @Slf4j @Controller @RequiredArgsConstructor public class LoginController { private final LoginService loginService; private final SessionManager sessionManager; @GetMapping("/login") public String loginForm(@ModelAttribute LoginForm form){ return "login/loginForm"; } // @PostMapping("/login") /*public String login(@Validated @ModelAttribute LoginForm form, BindingResult bindingResult, HttpServletResponse response){ if(bindingResult.hasErrors()){ return "login/loginForm"; } Member loginMember = loginService.login(form.getLoginId(), form.getPassword()); if(loginMember == null){ bindingResult.reject("loginFail", "아이디 또는 비밀번호가 맞지 않습니다."); return "login/loginForm"; } // 로그인 성공 처리 //쿠키에 시간 정보를 주지 않으면 세션 쿠키임(브라우저 종료시 모두 종료됨) Cookie idCookie = new Cookie("memberId", String.valueOf(loginMember.getId())); response.addCookie(idCookie); return "redirect:/"; // 홈으로 보냄 } // @PostMapping("/login") public String loginV2(@Validated @ModelAttribute LoginForm form, BindingResult bindingResult, HttpServletResponse response){ if(bindingResult.hasErrors()){ return "login/loginForm"; } Member loginMember = loginService.login(form.getLoginId(), form.getPassword()); if(loginMember == null){ bindingResult.reject("loginFail", "아이디 또는 비밀번호가 맞지 않습니다."); return "login/loginForm"; } // 로그인 성공 처리 // 세션 관리자 통해 세션 보관 ㅏ고 회원 데이터 보관 sessionManager.createSession(loginMember, response); return "redirect:/"; // 홈으로 보냄 } // @PostMapping("/login") public String loginV3(@Validated @ModelAttribute LoginForm form, BindingResult bindingResult, HttpServletRequest request){ if(bindingResult.hasErrors()){ return "login/loginForm"; } Member loginMember = loginService.login(form.getLoginId(), form.getPassword()); if(loginMember == null){ bindingResult.reject("loginFail", "아이디 또는 비밀번호가 맞지 않습니다."); return "login/loginForm"; } // 로그인 성공 처리 // 세션이 있으면 있는 세션을 반환, 없으면 생셩해서 반환 HttpSession session = request.getSession(true); // 기본이 true라 생략 가능, 세션을 생성(있으면)하려면 true false일때는 세션 없으면 널일뿐 //세션에 로그인 회원 정보 보관 session.setAttribute(SessionConst.LOGIN_MEMBER, loginMember); // 세션 관리자 통해 세션 보관 ㅏ고 회원 데이터 보관 return "redirect:/"; // 홈으로 보냄 }*/ @PostMapping("/login") public String loginV4( @Validated @ModelAttribute LoginForm form, BindingResult bindingResult, @RequestParam(defaultValue = "/") String redirectURL, HttpServletRequest request){ if(bindingResult.hasErrors()){ return "login/loginForm"; } Member loginMember = loginService.login(form.getLoginId(), form.getPassword()); log.info("login? {}", loginMember); if(loginMember == null){ bindingResult.reject("loginFail", "아이디 또는 비밀번호가 맞지 않습니다."); return "login/loginForm"; } // 로그인 성공 처리 // 세션이 있으면 있는 세션을 반환, 없으면 생셩해서 반환 HttpSession session = request.getSession(true); // 기본이 true라 생략 가능, 세션을 생성(있으면)하려면 true false일때는 세션 없으면 널일뿐 //세션에 로그인 회원 정보 보관 session.setAttribute(SessionConst.LOGIN_MEMBER, loginMember); // 세션 관리자 통해 세션 보관 ㅏ고 회원 데이터 보관 return "redirect:" + redirectURL; } //로그아웃 // @PostMapping("/logout") // public String logout(HttpServletResponse response){ // expireCookie(response, "memberId"); // return "redirect:/"; // } // @PostMapping("/logout") public String logoutV2(HttpServletRequest request){ sessionManager.expire(request); return "redirect:/"; } @PostMapping("/logout") public String logoutV3(HttpServletRequest request){ HttpSession session = request.getSession(false); if(session != null){ session.invalidate(); } return "redirect:/"; } private static void expireCookie(HttpServletResponse response, String cookieName) { Cookie idCookie = new Cookie(cookieName, null); idCookie.setMaxAge(0); response.addCookie(idCookie); } } 오타는 딱히 없는것 같은데 리다이렉트가 이루어지지 않습니다.
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part7: MMO 컨텐츠 구현 (Unity + C# 서버 연동 기초)
MMO 컨텐츠 구현의 MapTool에서 Util클래스 정보
이전 강의를 구매를 안해서 그런데, 만들어둔 Util클래스에 대한 코드는 어디서 확인할 수 있나요? 강의자료탭이 안보여서요.
-
해결됨스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
application.properties 새로 실행하면 코드가 사라져요
다시 실행버튼을 누르면 두번째 코드가 사라지는 현상이 발생합니다..밑에는 콘솔창 로그입니다..> Task :compileJava UP-TO-DATE> Task :processResources> Task :classes> Task :ServletApplication.main() . ____ _ /\\ / ___'_ __ (_)_ _ \ \ \ \( ( )\___ | '_ | '_| | '_ \/ _` | \ \ \ \ \\/ ___)| |_)| | | | | || (_| | ) ) ) ) ' |____| .__|_| |_|_| |_\__, | / / / / =========|_|==============|___/=/_/_/_/ :: Spring Boot :: (v3.2.4)2024-04-05T18:12:22.774+09:00 INFO 19692 --- [servlet] [ main] hello.servlet.ServletApplication : Starting ServletApplication using Java 20.0.2 with PID 19692 (C:\Spring\servlet\build\classes\java\main started by SUN in C:\Spring\servlet)2024-04-05T18:12:22.777+09:00 INFO 19692 --- [servlet] [ main] hello.servlet.ServletApplication : No active profile set, falling back to 1 default profile: "default"2024-04-05T18:12:23.715+09:00 INFO 19692 --- [servlet] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat initialized with port 8080 (http)2024-04-05T18:12:23.726+09:00 INFO 19692 --- [servlet] [ main] o.apache.catalina.core.StandardService : Starting service [Tomcat]2024-04-05T18:12:23.727+09:00 INFO 19692 --- [servlet] [ main] o.apache.catalina.core.StandardEngine : Starting Servlet engine: [Apache Tomcat/10.1.19]2024-04-05T18:12:23.772+09:00 INFO 19692 --- [servlet] [ main] o.a.c.c.C.[Tomcat].[localhost].[/] : Initializing Spring embedded WebApplicationContext2024-04-05T18:12:23.773+09:00 INFO 19692 --- [servlet] [ main] w.s.c.ServletWebServerApplicationContext : Root WebApplicationContext: initialization completed in 952 ms2024-04-05T18:12:24.053+09:00 INFO 19692 --- [servlet] [ main] o.s.b.w.embedded.tomcat.TomcatWebServer : Tomcat started on port 8080 (http) with context path ''2024-04-05T18:12:24.059+09:00 INFO 19692 --- [servlet] [ main] hello.servlet.ServletApplication : Started ServletApplication in 1.597 seconds (process running for 1.898)
-
미해결스프링 MVC 2편 - 백엔드 웹 개발 활용 기술
SendError 의 두번째 매개변수는 어디서 확인할 수 있나요?
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? [질문 내용]response.sendError(404, "404 오류!");해당 코드에서 두번째 매개변수는 콘솔에도 브라우저의 응답에서도 확인할 수 없는데 왜그런걸까요?검색해보니까 server.error.include-message and server.error.include-binding-errors 이런설정들을 해보라고해서 해봤는데 그래도 응답에 포함되는거같지않아서요..ㅠ"404 오류!" 이 텍스트는 어디서 확인할 수 있을까요?
-
미해결
Navigating NJ Civil Restraint Relief Process
When faced with harassment, abuse, threats or violence from another person, seeking a civil protective order can provide crucial legal protection and peace of mind. In New Jersey, victims have multiple options for obtaining a Civil Protective Order In New Jersey depending on their specific circumstances. However, the process can seem daunting for those unfamiliar with the legal system. This guide aims to walk you through the key steps for navigating the civil restraint relief process in the Garden State.What is a Civil Protective Order?A Civil Protective Order In New Jersey is a court order that restricts the conduct of an alleged offender towards a victim. It legally prohibits the offender from contact, communication, proximity or other acts that may constitute further harassment, abuse, threats or violence. Disobeying a protective order is a criminal offense that can result in fines or jail time.Types of Orders AvailableNew Jersey offers two main types of civil protective orders based on the relationship between the involved parties:1) Domestic Violence Restraining OrderThis order applies when the parties have a domestic relationship as spouses, former spouses, household members or dating partners. It aims to prevent further acts of domestic violence, assault, harassment or criminal sexual contact.2) Non-Domestic Violence Restraining Order Also known as a sexual assault restraining order, this protects victims from harassment, stalking, sexual assault or other criminal acts by people they do not have a domestic relationship with, such as acquaintances, coworkers or strangers.Eligibility and Evidence RequirementsTo obtain a Civil Protective Order In New Jersey, you must be able to demonstrate that you are a victim who has suffered from qualifying acts of violence, threats, harassment or abuse. Evidence can include police reports, medical records, witness testimony, texts/emails from the offender and other documentation.For a domestic violence order, the court will look for incidents of assault, harassment, criminal sexual contact, terroristic threats, criminal restraint, false imprisonment or other predicate acts of domestic violence defined by state law.Non-domestic orders require evidence of criminal acts like harassment, stalking, sexual assault, threats or other criminal offenses committed by the alleged offender.The Application Process Civil Protective Order In New Jersey applications must be filed through your county's Superior Court. The first step is to obtain a temporary restraining order (TRO) which provides immediate protection until a final hearing.To get a TRO, you'll need to complete written complaints/allegations along with your evidence. The court will review your case and, if it meets the criteria, will issue a TRO valid for approximately 10 days until your final restraining order hearing.At the final hearing, both parties can present witnesses and evidence. If the judge finds your allegations substantiated by a preponderance of evidence, a final restraining order can be issued which will remain in effect permanently unless you request to have it terminated or modified down the line.Remedies and ProvisionsCivil Protective Orders In New Jersey contain legally-binding provisions to prevent the offender from committing further acts of abuse, violence or victimization. Typical provisions can include:- Prohibiting offensive contact, communication, stalking or other harassment- Ordering the offender to stay away from the victim's home, workplace and other locations- Granting the victim temporary custody of minor children- Requiring the offender to attend counseling or domestic violence intervention programs- Ordering offender to pay compensatory damages or monetary compensation for losses- Forbidding offender's access to weapons or firearmsThe court aims to tailor the specific provisions to adequately protect the victim's safety and rights based on the circumstances of each case.Conclusion:While the process can seem intimidating, obtaining a Civil Protective Order New Jersey is a crucial option for victims of harassment, abuse or violence to legally safeguard their wellbeing. By understanding the types of orders, eligibility criteria, and application proceedings, victims can proactively take steps to navigate the restraint relief process effectively. With a protective order in place, offenders will be legally barred from further acts of harm or victimization, allowing the protected party to finally experience the security and peace of mind they deserve.
-
해결됨PowerApps 2단계, 우리 회사에 필요한 모바일 앱 만들기
[건의앱] 공유 Web link나 Mobile QR code 경우 실행시 SharePoint의 리스트에 등록이 안되는 현상
- 학습 관련 질문을 남겨주세요. 상세히 작성하면 더 좋아요! - 먼저 유사한 질문이 있었는지 검색해보세요. - 서로 예의를 지키며 존중하는 문화를 만들어가요. - 잠깐! 인프런 서비스 운영 관련 문의는 1:1 문의하기를 이용해주세요. 안녕하세요.강의 잘 듣고 있습니다. Power Automated나 Power Apps에서는 건의앱이 잘 실행되는데요. (SharePoint의 리스트에 추가/Email수신) 하지만 공유 Web link나 Mobile QR code로 PC나 스마트폰에서 실행하는 경우 실행은 되지만 제출버튼을 눌러도 SharePoint의 리스트에 등록이 되지 않습니다. (이메일도 수신불가) 이런 현상에 대해서 혹시 해결법이 있을까요?
-
미해결실전! 스프링 데이터 JPA
SpringDataJPA 의 page.getTotalElements 메서드의 공식 문서 링크는?
안녕하세요. Spring data jpa 페이징과 정렬 강의를 듣고있습니다. 아래 메서드를 사용하셨던데, 아래 메서드들에 대한 공식 문서를 찾고있는데 나오지가 않습니다.제가 공식 문서를 찾아보는데 익숙하지 않아 찾지 못한거같은데아래 메서드들에 대한 공식 문서가 있을까요?page.getTotalElements : 전체 Element 개수page.getNumber()page.getTotalPages()page.isFirst()page.hasNext
-
미해결웹 게임을 만들며 배우는 React
강좌에서 다루지 않은 기능들은 어떻게 학습하면 좋을까요?
안녕하세요 예전에 리액트 강좌를 수강하고 취업뒤에 다시 강좌를 찾아보게 되었습니다.요즘 공부방법에 대해서 고민이 많이 되는데 공식문서를 펼쳐놓고 공부하게 되면 이걸 어디에 적용하나 의문이 들면서 어디에 적용할지 모르니 이론만 알고 넘어가는데 이런식으로 넘어가는 개념은 시간이 지나면 다 까먹어버려서 밑빠진 독에 물을 붇는 느낌이 계속 납니다. 그래서 저도 다른분에게 조언을 들었을때, 프로젝트 중심으로 공부하라고 하셔서 한달동안 프로젝트 중심을 공부도 해봤습니다. 장점은 바로바로 실습을 적용하니 기억에도 잘남고 기술이 내것이 되는 느낌이 들어서 자신감이 생기는게 좋았습니다. 그런데 단점은 대부분 쓰던 기술만 계속 사용하게 되고 프로젝트에 따라서 안사용하는 기술도 많아서 그런 기술에 대해 모를때 불안감이 생깁니다. 또 전체적으로 이론을 정리하고 들어가는게 아니라 파편화된 지식을 필요할때마다 배워서 적용하는거라 정리가 필요하지 않나? 생각도 들고요.그래서 두가지 방법다 뭔가 정체되어있는 느낌이 많이 들어서 제로초님한테 조언을 얻고 싶습니다. 덕분에 취업도 하고 업무적으로 힘든것도 없는데 오히려 그래서 불안감이 많이 드는 요즘입니다. ㅎㅎ 항상 건강하세요. 감사합니다.
-
미해결김영한의 실전 자바 - 중급 1편
도와주세요!
학습하는 분들께 도움이 되고, 더 좋은 답변을 드릴 수 있도록 질문전에 다음을 꼭 확인해주세요.1. 강의 내용과 관련된 질문을 남겨주세요.2. 인프런의 질문 게시판과 자주 하는 질문(링크)을 먼저 확인해주세요.(자주 하는 질문 링크: https://bit.ly/3fX6ygx)3. 질문 잘하기 메뉴얼(링크)을 먼저 읽어주세요.(질문 잘하기 메뉴얼 링크: https://bit.ly/2UfeqCG)질문 시에는 위 내용은 삭제하고 다음 내용을 남겨주세요.=========================================[질문 템플릿]1. 강의 내용과 관련된 질문인가요? 예2. 인프런의 질문 게시판과 자주 하는 질문에 없는 내용인가요? 예3. 질문 잘하기 메뉴얼을 읽어보셨나요? 예[질문 내용]질문있습니다!Address address = new Address("서울");MemberV1 memverA = new MemberV1("회원A", address);System.out.println("memverA = " + memverA);이렇게 했을떄memverA.toString이 되어 public String toString() {return "MemberV1{" +"name='" + name + '\'' +", address=" + address +'}';} memverA에 toString으로 메서드오버라이딩된게 실행이 되는데여기 address는 참조값이기떄문에 또 address.toString을 찾아서가서 adress에 toString을 반환하는건가요? 이부분을 그림으로 그려도보고 해도 잘 안그려져서 혹시 설명가능할까요 ㅠㅠ
-
미해결[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버
Mac OS 쓰레드풀 사용 문제 질문드립니다. (11:12)
위쪽에도 같은 맥북 질문이 있는것으로 확인 하였는데 해결방법을 모르겠어서 질문드립니다. 쓰레드가 Console.WriteLine까지는 진입을 하지만 출력이 되지는 않는 문제가 발생합니다.또한 중간에 쓰레드가 전부 사라져버리고 디버깅이 더이상 진행되지 않는 문제가 발생합니다.
-
미해결
Where to buy embroidered sweatshirt
In the heart of Embroiden, you'll discover the perfect synergy between the enduring charm of embroidery and the ever-evolving world of craftsmanship. Our commitment lies in the fusion of tradition and contemporary spirit, where the delicate beauty of needlework flourishes anew.- Website:https://embroiden.com/- Address: 9217 Kirkby Lane, Stockton. CA 95210, USA- Email: support@embroiden.com- Phone: +1 (701)353-5592#Embroiden #Embroid #embroider #Embroidered #EmbroideredSweatshirts
-
미해결스프링 시큐리티 OAuth2
혹시 추후에 해당 강의도 최신 Spring Security 6.x 버전으로 다시 강의가 나올 수 있을까요?
궁금합니다!!
-
미해결스프링 배치
다수의 배치와 메타 테이블간 의존성 관련 질문드립니다
안녕하세요.실무에 Quartz + Batch를 조합한 스케줄링 적용을 위해 강의를 보며 고군분투 하는 와중에 질문이 있습니다.만약 배치 간격이 같다면 각각의 배치는 서로다른 비즈니스 로직을 수행하지만 배치 메타 데이터 저장을 위해 동시에 같은 메타 테이블에 접근을 해야되지 않나요 ?? 테스트를 해보니 중간에 batch_job_execution_context, batch_job_execution_param 같은 테이블에 insert 같은 작업을 하다 문제가 발생했다며 오류가 발생합니다. 어쩔수 없이 구조상 시간을 다르게 해야되는 건지 이미 수행중인 배치가 있는지 체크를 하고 작업을 잠시 미루도록 만들어야 하는지... 궁금합니다.(아직 학습이 미흡하여 부족한 질문.. 죄송합니다)
-
해결됨파이썬/장고 웹서비스 개발 완벽 가이드 with 리액트 (장고 4.2 기준)
[View 함수를 통한 요청 처리] 챕터 아카이브 관련 질문 있습니.
<div> <h3>Nav</h3> <div class="alert alert-info"> 지난/다음 달 context data를 지원 </div> <div class="btn-group d-flex w-100"> {% if previous_month.year and previous_month.month %} <a href="{% url 'hottrack:song_archive_month' previous_month.year previous_month.month %}" class="btn btn-primary"> 지난 달 </a> {% endif %} {% if next_month.year and next_month.month %} <a href="{% url 'hottrack:song_archive_month' next_month.year next_month.month %}" class="btn btn-primary"> 다음 달 </a> {% endif %} </div> </div>2014-02 , 2023-09 release_date의 최소, 최대 구간에서 조회시 에러가 납니다. 깃허브 및 강의 내용 확인 결과 처리하는 부분이 반영이 안되어있는거 같습니다./hottrack/archives/2020/week/35/2020년 35주, 2020년 23주, 2020년 14주, 2019년 39주, 2014년 7주다른 부분은 정상 작동 되지만 해당 부분에서 에러가 납니다.2020의 35주는 8월24일, 2014년 7주는 2월10일 부터인데 데이터 베이스에서 조회 할때는 확인 됩니다.매번 장고 프로젝트를 생성하고 환경설정 하는게 번거로워서 미리 초기 세팅을 해놓은 프로젝트에 깃허브 저장소에서 mydjango03-hottrack에서 hottrack 앱을 복사하였고 [View 함수를 통한 요청 처리]의 내용을 그대로 따라 진행했습니다.git clone으로 저장소에서 mydjango04를 받고 테스트 해보려 했었는데 env 파일이 없어서 에러가 나기에 테스트를 못해봐서 왜 저 부분에서만 에러가 나는것인지 궁금해서 질문드립니다.버전 호환성에 따라 문제가 될 수 도 있을거 같아서 제가 설정한 초기 세팅 부분은 혹시 모르니 첨부 해놓았습니다.Pipfile[[source]] url = "https://pypi.org/simple" verify_ssl = true name = "pypi" [packages] django = "*" djangorestframework = "*" djangorestframework-simplejwt = "*" django-filter = "*" django-extensions = "*" django-environ = "*" django-cors-headers = "*" django-template-partials = "*" django-htmx = "*" psycopg2-binary = "*" pillow = "*" markdown = "*" ipython = "*" black = "*" requests="2.31.0" pandas = "2.1.3" django-bootstrap5 = "*" [dev-packages] pytest-django = "*" django-debug-toolbar = "*" httpie = "*" [requires] python_version = "3.12"Env# 암호키 SECRET_KEY=django-insecure-sf($0b=0xjgkzmsyu%*bn6cx9$_b%*rz=%$whp8(-^_q+ # 데이터 베이스 DATABASE_ENGINE=django.db.backends.postgresql DATABASE_HOST=localhost DATABASE_PORT=5432 DATABASE_NAME=mydb4 DATABASE_USER=myuser4 DATABASE_PASSWORD=mypw4 # 코어스 ALLOWED_HOSTS=localhost,127.0.0.1 CORS_ALLOWED_ORIGINS=http://127.0.0.1:3000,http://localhost:3000 CORS_ALLOW_CREDENTIALS=True # 타임존 LANGUAGE_CODE=ko-kr TIME_ZONE=Asia/Seoul USE_TZ=False # 디버그 DEBUG=True INTERNAL_IPS=127.0.0.1
-
해결됨Next + React Query로 SNS 서비스 만들기
next14 app router 배포 nginx index.html 물리기
프로젝트를 하다가 next를 배포해서 nginx에 물리려고 했는데 index html 을 찾아서 물려줘야 된다고 해서 강의에서 나온 nextConfig 에서 output:'export 를 해주면 index html 이 뜨는건 확인을 하였습니다. 근데 문제는 제가 서버에서의 기능을 많이 썼기 때문에 정적으로 배포가 어려움이 있었습니다. 다른 방법이 있을까요..?
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
mvc 1편 상품상세 실행 오류입니다.
상품상세 실행 중java.lang.IllegalArgumentException: Name for argument of type [java.lang.Long] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag.오류 메세지가 나옵니다.https://drive.google.com/file/d/1Uqz3Fdgnh66wMES8vdChuriSCb3zXb_S/view?usp=sharing
-
해결됨직장인에게 꼭 필요한 파이썬-아래아한글 자동화 레시피
print(hwp.GetFieldList()) 결과값에 구분자가 x02가 아닌 값이 나옵니다.
안녕하세요. 질문올립니다. 문서의 필드목록 및 필드 값 취득하기에서 print(hwp.GetFieldList())를 실행하면 예제의 이름\x02성별\x02생일\x02취미\x02가 아니라이름성별생일취미이름성별생일취미이름성별생일취미이름성별생일취미이름성별생일취미이름성별생일취미""이 구분자로 붙어서 나옵니다.구분자는 컴퓨터 환경마다 다른 건가요?
-
미해결스프링 MVC 1편 - 백엔드 웹 개발 핵심 기술
mvc1편 상품상세 오류 문의 합니다.
메서드 코딩하고 @GetMapping("/{itemid}") public String item(@PathVariable Long itemId, Model model){ Item item = itemRepository.findById(itemId); model.addAttribute("item", item); return "basic/item"; }html은 basic에 카피해서 tymeleat와 css 부분만 수정했습니다.<!DOCTYPE HTML> <html xmlns:th="http://www.thymeleaf.org"> <head> <meta charset="utf-8"> <link th:href="@{/css/bootstrap.min.css}" href="../css/bootstrap.min.css" rel="stylesheet"> <style> .container { max-width: 560px; } </style>실행하면java.lang.IllegalArgumentException: Name for argument of type [long] not specified, and parameter name information not available via reflection. Ensure that the compiler uses the '-parameters' flag.오류가 뜹니다.
-
해결됨[C#과 유니티로 만드는 MMORPG 게임 개발 시리즈] Part4: 게임 서버
PacketSession에서 buffer.Count와 dataSize의 비교
안녕하세요 PacketSession에서 if (buffer.Count < dataSize) break;이 부분의 코드가 왜 필요한지에 대해서 의문이 생겨 질물 남깁니다 예를들어 100바이트 크기의 버퍼가 OnRecv매개변수로 들어왔고 해당 100 바이트가 5가지 패킷의 정보를 들고 있다고 했을 때하나의 패킷을 처리할 때 마다 해당 크기의 dataSize만큼 buffer크기(Count)가 갱신 될텐데 그렇게 된다면 위의 조건에는 들어오게 될 일이 전혀 없게 되는거 아닌가요?
-
미해결스프링 핵심 원리 - 기본편
static 영역 및 객체 생성
강의자료에 'static 영역에 객체 instance를 미리 하나 생성해서 올려둔다.'라고 되어있는데요. heap 영역에 SingletonService 인스턴스를 생성하고 이 인스턴스에 주소값이 static 영역에 저장된다는 말이 맞을까요?? static 변수라도 객체 인스턴스는 heap 영역에 저장되는게 맞을까요?