전체 글(21)
-
Spring @ResponseBody charset=UTF-8
Spring @ResponseBody UTF-8 Content-Type: application/json일 경우 charset=UTF-8이 붙는데 Content-Type: text/html일 경우charset=UTF-8이 붙지 않는다 해결책: 에서 text/html;charset=UTF-8 추가해주면 해결 된다
2018.10.02 -
mybatis foreach insert statement
DAOsql.insert("main.insertPop",param); XML INSERT INTO TABLE (TYPE,SEQ,CONTENTS,CODE) VALUES (#{type},#{item.seq},#{item.contents},#{item.code}) VALUES 이후로 반복시켜 주면 반복 횟수 만큼 로우가 입력된다
2018.10.01 -
javascript string currency
var str = "123456123";str.replace(/(\d)(?=(\d{3})+(?!\d))/g, "$1,");
2018.09.18 -
tomcat link folder
보안 문제때문에 톰캣은 link인 파일이나 디렉터리는 기본적으로 따라가지 않는다 link를 사용한다면 Context에 allowLinking 설정을 추가해야 사용할 수 있다.
2018.09.18 -
Closing tag '?>' is redundant for files containing only PHP code
PhpStrom을 사용하다 보면 Closing tag '?>' is redundant for files containing only PHP code 경고를 만날 때가 있다. 경고는 PHP code만 있는 파일은 닫기 태그 '?>'를 포함하고 있다고 말하고 있다. PHP code만 작성할 경우 닫기 태그를 생략하라고 경고 하는 듯...
2018.05.10 -
SELECT , UPDATE 쿼리
--SET SUBQUERY UPDATE [테이블명] SET (컬럼, 컬럼1, ...) = (값, 값1, ... ) [WHERE conditions]; EX) update TABLE set (pk, id, name) = (select pk, id, name from DIFTABLE where pk = 1) -- 만약 해당 서브쿼리의 조회결과 갯수가 2개 이상일 시 에러 --FROM SUBQUERY update [테이블명] set [업데이트할 컬럼] = [업데이트 값] from [테이블명] where [조건] EX) update TABLE set count = TABLE.count + a.count from (select * from DIFTABLE) as a where TABLE.pk = a.pk -- p..
2018.04.24