분류 전체보기
-
[Spring] page 전환 없이 body(content)만 변경하는 방법Java/Spring 2022. 12. 5. 13:40
1. tiles.xml template을 2개로 나누어 적용한다. - mainLayout.jsp : 공통으로 사용될 header, menu, body(최초 로딩되는 페이지의 body), footer 구성 - mainLayout2.jsp : body(변경될 body)로만 구성 2. Layout mainLayout.jsp는 태그에 id를 부여하여 직접적으로 핸들링이 가능하도록 한다. 3. JSP Test를 위해 clickable한 영역을 준비한다. Click Here! 4. Javascript 위 선택 시 태그의 id를 활용하여 기존 body를 제거하고, 새로운 body를 생성한다. $('#_testTables').on('click', function() { $('#main').children().remov..
-
[Linux | CentOS] Time zone 변경하기OS/Linux 2022. 6. 24. 18:51
Default 값으로 리눅스를 설치하는 경우 타임존은 'UTC'로 설정될 수 있다. 이러한 경우 간단한 명령어를 통해 Time zone을 한국시간인 'KST'로 설정할 수 있다. 1. Time zone 확인 CentOS에서 날짜와 시간을 확인하기 위한 명령어는 아래와 같다. date 더 상세한 시간 정보를 알고 싶다면, 아래 명령어를 사용한다. timedatectl 현재 Time zone은 'UTC'로 설정되어 있으며, 한국시간 기준으로 -09:00 차이가 났다. 2. Time zone 변경 'UTC'를 'KST'로 변경하려면 아래 명령어를 사용한다. timedatectl set-timezone Asia/Seoul 다시, date 또는 timedatectl 명령어를 통해 변경된 현재시간 및 Time zo..
-
[DB] DBMS별 버전 정보 확인DB/Etc. 2022. 6. 22. 18:30
1. MSSQL SELECT @@VERSION; 2. MySQL SELECT VERSION(); 3. MariaDB SELECT @@VERSION; SELECT VERSION(); 4. ORACLE SELECT * FROM v$version; SELECT * FROM product_component_version; 5. PostgreSQL SELECT version(); 6. Tibero SELECT * FROM v$version WHERE NAME = 'TB_MAJOR' OR NAME = 'TB_MINOR'; 7. Altibase SELECT * FROM V$VERSION;
-
[PostgreSQL #2] error: connection to server on socketDB/PostgreSQL 2022. 6. 21. 18:36
brew update 이후 아래와 같은 에러가 발생하여, 서버에 접속하지 못했다. psql: error: connection to server on socket "/tmp/.s.PGSQL.5432" failed: No such file or directory Is the server running locally and accepting connections on that socket? 필자의 경우 pid 중복 문제로 판단되어, pid 제거 후 서비스를 재시작하여 문제를 해결하였다. $ rm /usr/local/var/postgres/postmaster.pid $ brew services restart postgresql Test Environment Info. - OS : macOS Catalina 10..
-
[MariaDB | Mybatis] Mybatis에서 insert문 테이블 여러개 동시 실행방법DB/MariaDB 2022. 6. 21. 14:02
DB Connection 설정 부분에 allowMultiQueries=true 를 입력하면, insert문이 다중 실행된다. 1. jdbc.properties jdbc:mariadb://localhost:3306/test_db?allowMultiQueries=true 2. textSQL.xml insert into test1 values('e','s','h'); insert into test2 values('e','s','h'); 3. Test Result Test Environment Info. - OS : macOS Catalina 10.15.2 - JDK : 1.8.0_321 - STS : 4.13.0.RELEASE - MariaDB : 10.7.4 - DBeaver : 21.3.1
-
[SpringBoot #3] 고객 생성하기Java/SpringBoot 2022. 6. 20. 20:09
1. Lombok 설치하기 1) pom.xml 파일을 열어 dependency를 추가한다. org.projectlombok lombok 2) 파일 저장 3) 프로젝트 클린 - Project > Clean... > Clean 4) Maven Update - 프로젝트 우클릭 > Maven > Update Project... > OK 2. Entity package com.egurishun.domain.entity; import javax.persistence.Column; import javax.persistence.Entity; import javax.persistence.GeneratedValue; import javax.persistence.GenerationType; import javax.persi..
-
[SpringBoot #2] Package, Class 생성Java/SpringBoot 2022. 6. 17. 18:24
1. Package 생성 package는 크게 config, controller, entity, repository, service 총 5개로 구성한다. com.egurishun.config com.egurishun.controller com.egurishun.domain.domain.entity com.egurishun.domain.domain.repository com.egurishun.domain.service 1) 프로젝트 우클릭 > New > Package 선택 2) Name : com.egurishun.config 입력 3) 'Finish' 버튼 선택 4) Package 생성 확인 위와 같은 방법으로 아래 Package들을 생성한다. com.egurishun.controller com.egur..