springboot20 [JPA] QueryDSL 소개 및 프로젝트 설정하기 QueryDSL이란? QueryDSL은 하이버네이트 쿼리 언어(HQL: Hibernate Query Language)의 쿼리를 타입에 안전하게 생성 및 관리해주는 프레임워크이다. QueryDSL은 정적 타입을 이용하여 SQL과 같은 쿼리를 생성할 수 있게 해 준다. 자바 백엔드 기술은 Spring Boot와 Spring Data JPA를 함께 사용한다. 하지만, 복잡한 쿼리, 동적 쿼리를 구현하는 데 있어 한계가 있다. 이러한 문제점을 해결할 수 있는 것이 QueryDSL이다. QueryDSL이 등장하기 이전에는 Mybatis, JPQL, Criteria 등 문자열 형태로 쿼리문을 작성하여 컴파일 시에 오류를 발견하는 것이 불가능했다. 하지만, QueryDSL은 자바 코드로 SQL 문을 작성할 수 있어 .. JVM/JPA 2023. 5. 25. [MyBatis] SpringBoot MyBatis 쿼리 로그 설정하기 의존성(dependency) 추가 implementation "org.bgee.log4jdbc-log4j2:log4jdbc-log4j2-jdbc4:1.16" 프로퍼티 파일 추가 파일 : log4jdbc.log4j2.properties 경로 : src/main/resources log4jdbc.spylogdelegator.name=net.sf.log4jdbc.log.slf4j.Slf4jSpyLogDelegator log4jdbc.dump.sql.maxlinelength=0 datasource 설정 설정 파일 : application.yml driver-class-name 추가 jdbc url 변경 : "log4jdbc:" 추가 spring: datasource: driver-class-name: net.s.. Database/MyBatis 2022. 10. 24. [JPA] SpringBoot JPA 쿼리 로그 설정하기 SpringBoot JPA를 사용할 때, SQL 쿼리문을 표출하는 설정 관련해서 정리해보자. 요약 application.yml spring: jpa: properties: hibernate: show_sql: true format_sql: true use_sql_comments: true logging: level: org: hibernate: type: descriptor: sql: trace application.properties spring.jpa.properties.hibernate.show_sql=true spring.jpa.properties.hibernate.format_sql=true spring.jpa.properties.hibernate.use_sql_comments=true logg.. JVM/JPA 2022. 7. 27. [IntelliJ] 인텔리제이 IDEA 스프링 부트 프로젝트 빌드/실행 시 오류 (Command line is too long) 프로젝트 루트 경로에 .idea 폴더를 들어가서 그 폴더 내 workspace.xml 을 수정한다. ... ... ... 동일한 코드가 CDATA로 묶여있어 아래와 같이 입력해주었다. 출처 : https://jaimemin.tistory.com/1531 IDE/IntelliJ 2022. 6. 21. [SpringBoot] 전자정부프레임워크 SpringBoot 테스트용 웹 프로젝트 만들기 기본Spec EgovFramework 4.0 - 64bit Java 1.8 Tomcat 8.0 Gradle Project SpringBoot 2.6.5 전자정부 프레임워크 4.0 설치 https://haenny.tistory.com/294 [EgovFramework] 전자정부프레임워크 4.x 개발환경 다운로드 및 Lombok 설치 [EgovFramework] 전자정부프레임워크 4.x 개발환경 다운로드 및 Lombok 설치 전자정부프레임워크 다운로드 전자정부프레임워크 4.x 개발환경 다운로드 받으러가기 개발환경 - 4.x 다운로드 | 표준프레임 haenny.tistory.com JDK (Java) 설치 https://haenny.tistory.com/219 [Java] Windows10 환경 OpenJDK.. JVM/SpringBoot 2022. 4. 4. SpringBoot "Path with "WEB-INF" or "META_INF" : [WEB-INF/jsp/main.jsp]" 경고 및 Whitelabel Error Page 오류 "Path with "WEB-INF" or "META-INF" : [WEB-INF/jsp/main.jsp]" SpringBoot 에서 main.jsp 화면을 만들고, Controller에서 View로 리턴을 하였는데 jsp 파일을 찾지 못하는 경우 ResourceHttpRequestHandler : Path with "WEB-INF" or "META-INF" 이런식으로 발생하는 오류이다. 브라우저에는 첨부한 이미지와 같이 Whitelabel Error Page가 표출되고, Console에서는 위와 같은 오류 로그를 확인할 수 있다. 이 오류는 Spring Boot에서 내장된 Tomcat을 사용 하는 경우 JSP 를 처리하는 서블릿을 추가하지 않아 발생하는 것으로 의존성(dependency)을 추가해주면 .. JVM/SpringBoot 2022. 4. 3. Failed to determine a suitable driver class 오류 해결 오류 로그 ********************************* APPLICATION FAILED TO START ********************************* Description: Failed to configure a DataSource: 'url' attribute is not specified and no embedded datasource could be configured. Reason: Failed to determine a suitable driver class Action: Consider the following: If you want an embedded database (H2, HSQL or Derby), please put it on the classpath.. JVM/SpringBoot 2022. 4. 2. SpringBoot 2.5 → 2.6 업그레이드 시No more pattern data allowed after {*...} or ** pattern element 오류 해결 오류 로그 No more pattern data allowed after {*...} or ** pattern element ********************************* APPLICATION FAILED TO START ********************************* Description: Invalid mapping pattern detected: /**/*.do ^ No more pattern data allowed after {*...} or ** pattern element Action: Fix this pattern in your application or switch to the legacy parser implementation with 'spring.mvc.pa.. JVM/SpringBoot 2022. 4. 2. SpringBoot Initializing Spring DispatcherServlet 'dispatcherServlet' SpringBoot 실행 후 웹페이지 로드 시에 표출되는 로그 Initializing Spring DispatcherServlet 'dispatcherServlet' Initializing Servlet 'dispatcherServlet' Completed initialization in 1 ms application.properties 에 load-on-startup 추가 spring.mvc.servlet.load-on-startup=1 load-on-startup web-xml 에서 서블릿 설정 시 들어가는 숫자 해당 서블릿의 init() 메소드가 호출되는 시기와 순서를 정하는 것 보통의 서블릿은 반드시 '해당 서블릿'에 최초 요청이 들어올 때만 인스턴스화 초기 설정을 하게 되는데 시간이 너무 오래 .. JVM/SpringBoot 2022. 4. 1. [SpringBoot] 스프링부트 properties 설정파일 분리하기 Spring properties 설정파일 분리방법 [Spring] 스프링 properties 설정 파일 분리하기 서버환경에 따라 종속적인 정보가 있을 경우(로컬, 개발, 운영에 대한 DB 정보가 다를 때), 이를 애플리케이션의 구성정보를 하기 위해 주석을 지우고, 다른 서버 환경의 정보는 주석을 설정하고 haenny.tistory.com 위의 내용과 마찬가지로, 스프링부트 적용방법도 알아보겠다. 스프링부트는 매우 간단하다. 공식 문서를 보면 application-${profile}.properties 가 간단하게 프로필 파일로 관리해주는 역할을 한다고 한다. 각각의 파일을 만들어 보자. 기본 구조 개발과 실서버 환경에 따라 DB 설정과 TABLE 설정을 달리하는 것을 알 수 있다. 이를 개발, 실서버의 .. JVM/SpringBoot 2022. 1. 26. [Launch4j] JAR 파일로 응용프로그램(exe파일) 만들기 [Launch4j] JAR 파일로 응용프로그램(exe파일) 만들기 1. Launch4j 다운로드 및 설치 Launch4j - Cross-platform Java executable wrapper Cross-platform Java executable wrapper Launch4j is a cross-platform tool for wrapping Java applications distributed as jars in lightweight Windows native executables. The executable can be configured to search for a certain JRE version or use a bundled one launch4j.sourceforge.net 2. Basi.. JVM/SpringBoot 2022. 1. 25. [VueJS] Eclipse SpringBoot + VueJS 시작하기 - ① 설치 및 세팅 방법 [VueJS] Eclipse SpringBoot + VueJS 시작하기 - ① 설치 및 세팅 방법 1. SpringBoot 프로젝트 생성하기 New - Project - Other - Gradle Project 를 통해 프로젝트를 생성해도 되지만, 주로 유용하게 사용하는 방법을 소개해드리려고한다. Spring Initializr 사이트에 접속한다. 프로젝트 버전 및 정보를 각자에 맞게 입력하고, Generate - Ctrl + Enter 버튼을 클릭해준다. Project : Gradle Project Launuage : Java SpringBoot : 2.6.2 Project Metadata - Group : com.tistory.haenny - Artifact : VUE_PRJ - Description.. Front/Vue.js 2022. 1. 10. 이전 1 2 다음 추천 글 728x90 반응형