본문 바로가기

분류 전체보기191

23.06.30 만들기로 한 주제 : keepit - 크롬 페이지 즐겨찾기를 피드로서 볼 수 있는 기능을 가지고 있다. 호중님이 아이디어를 내 주셨습니다. ↓참조한 블로그 https://cau-meng2.tistory.com/63?category=774824 KeepIt 웹페이지 연결 & 토큰 저장 크롬익스텐션 개발 프로젝트 KeepIt Chrome Extension 개요 KeepIt은 자신이 저장하고 싶은 웹사이트 링크들을 나만의 공간에 분류 및 저장할 수 있게 해주며, Instagram, facebook, Pinterest처럼 뉴스피드 형식으로 모아보기, 팔로우, 팔로 cau-meng2.tistory.com api 문서 https://documenter.getpostman.com/view/27923993/2s93zB.. 2023. 6. 30.
23.06.29 n의 배수 구하기 public int[] solution(int n, int[] numList) { ArrayList nums = new ArrayList(); for (int num : numList) { if (num%n == 0) { nums.add(num); } } int[] answer = new int[nums.size()]; for (int i = 0; i < nums.size(); i++) { answer[i] = nums.get(i); } return answer; } 2차원 배열로 만들기 public int[][] solution(int[] num_list, int n) { int size = num_list.length; int[][] answer = new int[size/n][n].. 2023. 6. 29.
23.06.29 OneToMany mappedby를 comment로 해서 매핑에 문제가 생긴거였다. comment에서 comment를 조회할 순 없으므로 참조하고 있는 blog를 통해 매핑했어야 했다. 삭제는 해결이 됐으나 조회에서 문제가 발생했다. 댓글이 없을 때는 조회가 제대로 작동하나 댓글이 있다면 InvalidDefinitionException오류가 발생한다. LAZY로 설정되어 있어서 Jackson으로 Serialize할 때 비어있는 객체를 Serialize하려고 해서 생기는 오류라고 한다. Hibernate.initialize(blog.getComments());를 추가해 봤으나 같은 에러 발생 // Blog 엔티티 @OneToMany(mappedBy = "blog", cascade = CascadeType... 2023. 6. 29.
23.06.28 lv3을 해결하기위해 강의를 듣던 중 강사님이 User의 PK를 username으로 두는 것을 보고 좋은 방법이라 생각해 이 부분을 수정해 보았다. 내가 만든 서비스를 전 세계에 보일 때는 타임존을 통일해야 해서 글로벌 런칭을 한다면 꼭 필요한 과정이라고 알려주셔서 한 번 추가해 봤다. @EnableJpaAuditing @SpringBootApplication public class MyBlogBackendApplication { @PostConstruct public void setDefaultTimeZone() { TimeZone.setDefault(TimeZone.getTimeZone(ZoneId.of("UTC"))); } public static void main(String[] args) { S.. 2023. 6. 28.