본문 바로가기

2016/015

자바스크립트에서 utf-8로 csv 추출할 때 한글 깨짐 문제 자바스크립트에서 utf-8로 csv 추출할 때 한글 깨짐 문제BOM있는 utf-8 로 추출.. 데이터 앞부분에 %EF%BB%BF 추가 data:text/csv;charset=utf-8,%EF%BB%BF Export Data in CSV file 2016. 1. 22.
spring boot 에서 db - autoreconnect 설정 추가 application.properties 에 다음 라인 추가spring.datasource.testOnBorrow=true spring.datasource.validationQuery=SELECT 1testOnBorrow 설정에는 validationQuery가 반드시 필요 2016. 1. 15.
springBoot / jpa / hibernate 에서 엔티티의 테이블명, 컬럼명 오류 spring boot JPA@Entity @Table(name="SC_TRAN") public class Sms extends Message{ @Id @GeneratedValue(strategy = GenerationType.AUTO) @Column(name = "TR_NUM") private long id; 위와 같이 어노테이션으로 테이블명도 대문자, 컬럼명도 대문자로 지정되어 있다. 하지만 쿼리가 소문자 or 대소문자 구분이 안되어 나오는 문제.. spring boot 가 자동으로 컬럼명, 테이블명을 넣어서 생기는 문제다. application.properties에서 naming-strategy를 아래와 같이 수정한다.spring.datasource.url=jdbc:mysql://localhost/s.. 2016. 1. 13.
json 배열 합치기(merge) 및 소팅하기 var by = function (name) { return function (o, p) { var a, b; if (typeof o === 'object' && typeof p === 'object' && o && p) { a = o[name]; b = p[name]; if (a === b) { return 0; } if (typeof a === typeof b) { return a > b ? -1 : 1; } return typeof a > typeof b ? -1 : 1; } else { throw { name: 'Error', message: 'Expected an object when sorting by ' + name }; } }; };alerts2 = [{ "id": "test", "comm.. 2016. 1. 13.
mysql 사용자/권한 관리 사용자 입력 > use mysql; > insert into user(host,user,password,ssl_cipher,x509_issuer,x509_subject) values('%','test',password('world!@#'),'','',''); > flush privileges; 권한 설정 > grant all privileges on test.* to 'test'@'%' identified by 'world!@#'; or > grant select, insert, update, delete on test.* to 'test'@'%' identified by 'world!@#'; > flush privileges; 권한 확인 > show grants for test@'%'; 권한 삭제 > .. 2016. 1. 13.