본문 바로가기
반응형

전체 글201

[Spring boot] 취업정보 크롤링 정제 작업 접수 기간 기준으로 정렬하기백엔드 서비스 클래스에서 정렬하는 코드 추가하기. private List filterAndCleanJobs(List jobs) { // 중복 제거 (detailLink 기준) Map uniqueJobs = new HashMap(); for (JoblistsDTO job : jobs) { uniqueJobs.put(job.getDetailLink(), job); } // 필드 형식 통일 및 빈 데이터 제거 List filteredJobs = uniqueJobs.values().stream() .filter(this::isValidJob) .. 2024. 5. 31.
[Spring] 글쓰기 제한하기 관리자만 글 등록 가능하게 하기 FaqQuestion.vue관리자만 글 작성 가능하도록 수정함. 번호 제목 글쓴이 날짜 {{ index + 1 + (currentPage * pageSize) }} {{ question.title }} {{ question.writer }} {{ question.date }} Page {{ currentPage + 1 }} Page {{ curre.. 2024. 5. 27.
[Spring boot, Vue3] 사이트 크롤링 하기 채용공고 크롤링가져올 URL : https://job.incruit.com/jobdb_list/searchjob.asp?occ2=574&occ1=120&rgn2=11  build.gradle에 jsoup 추가하기implementation 'org.jsoup:jsoup:1.14.3'CrawlingPage.vue 취업 리스트 크롤링 채용 제목 기관 고용 형태 근무 지역 접수 기간 .. 2024. 5. 27.
글쓰기 에디터 Quill Editor Quill Editorvue3에서 게시판 글쓰기 에디터로 Quill을 사용함. 설치가 간편하며, 가볍다.    https://quilljs.com/ Quill - Your powerful rich text editorBuilt for Developers Granular access to the editor's content, changes and events through a simple API. Works consistently and deterministically with JSON as both input and output.quilljs.com 2024. 5. 27.
0525 프로젝트 트러블슈팅 게시판 정렬 및 출력 JPA 방언 설정spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MariaDB106Dialectspring.jpa.hibernate.ddl-auto=updatespring.jpa.properties.hibernate.format_sql=truespring.jpa.properties.hibernate.show_sql=true faq 게시판 crud 수정, css, 게시판 역순정렬questionId가 undefined로 전달되는 문제 :  fetchQuestions() { axios.get(`http://localhost:3000/api/faqquestions/paged?page=${this.currentPage}&size=${th.. 2024. 5. 27.
마이페이지에 DB값 불러와서 출력하기 마이페이지 심리검사 결과문제는 Vue.js 코드에서 axios 요청을 보낼 때, 반환되는 데이터 형식과 Vue.js 코드에서 사용하는 데이터 형식이 일치하지 않기 때문입니다. 백엔드에서 반환되는 데이터는 TestResult 객체 하나이지만, Vue.js 코드에서는 testResult를 배열로 처리하고 있습니다. 정말 자주 겪었던 데이터 형식 문제.  테스트 결과 테스트 번호: {{ testResult.tno }} SID: {{ testResult.sid }} QID: {{ testResult.qid }} 답변: {{ testResult.tanswer }} 총 점수: {{ t.. 2024. 5. 20.
DB에 있는 List값을 불러오지 못하는 경우 문제계속 List 값을 불러오지 못하는 에러가 있었음.MySimriController@RestControllerpublic class MySimriController { @Autowired private TestResultRepository testResultRepository; @Autowired private JwtService jwtService; @GetMapping("/api/mysimri") public ResponseEntity getTestResultsForQid( @CookieValue(value = "token", required = false) String token ) { System.out.println("심리결과 토.. 2024. 5. 20.
기존 DB 테이블에 id 저장하기 (토큰으로 받아오기) DB에 id 저장memberId 받아와서 db에 저장하기token으로 받아와야 함. @PostMapping("/submitTest") public ResponseEntity submitTest(@RequestBody ResultData resultData, @CookieValue(value = "token", required = false) String token) { System.out.println(resultData + "토큰 submit test");TestResult (entity)해당 테이블에 memberId 컬럼을 만들어줌 @Column(name = "member_id") @Comment("회원 ID") private int mem.. 2024. 5. 20.
심리검사 총점 받아오기 클라이언트 vue 코드 submitTest() { console.log(this.userAnswers); console.log('네비게이션 전에 로그 출력'); const isAllAnswered = Object.keys(this.userAnswers).length === this.questions.length; if (!isAllAnswered) { alert("모든 질문에 답해주세요."); return; // 모든 질문에 답하지 않았다면 여기서 함수 종료 } // 총점 계산을 위해 각 질문의 답변을 배열에 담기 const userAnswersArray = this.questions.map(question =>.. 2024. 5. 17.
[vue3 + spring boot] 클라이언트와 서버 형식이 다를 때 검사 페이지와 결과 페이지의 결과값이 다르다. submitTest의 내용이 맞다. submitTest와 getTestResult의 코드를 맞춰야 한다.  문제 1서로 보내는 형식이 다르다.   보내는 형식을 맞춰줘야 한다.   문제 2서버 콘솔에서 null값이 있다고 나온다. Received answers: [null, 3, null, 3, null, 3, null, 3, null, 3, null, 3, null, 3, null, 3, null, 3, null, 3, null] => null 값을 처리하는 로직을 추가하자.  // 미응답 질문에 대한 기본값 설정 (예: 0) const userAnswersArray = this.questions.map(question => { .. 2024. 5. 14.
반응형