기본 콘텐츠로 건너뛰기

2017의 게시물 표시

2022 08 26 회사 워크샵

ttf , otf 를 웹 폰트로 변환해주는 사이트

https://onlinefontconverter.com/ 첫 페이지   변환해야 할 확장자를 선택후 SELECT FONT(S) 클릭 변경 해야 할 파일을 드로그엔 드랍 또는 파일 선택 좌측 하단에 변경해야 할 파일 갯수 확인 Done 클릭 으로 컨버팅 시작 Save Your Fonts 클릭하여 변경된 폰트 다운로드 가능함 Convert more 로 폰트 변경 가능 혹시나 기부 하실분은 Donate 로 기부 하시면 됩니다.

mybatis에서 NumberformatException이 나는 경우

출처 : http://t-ara72.blogspot.kr/2013/10/mybatis-numberformatexception.html java.lang.NumberFormatException: For input string: “y” 에러 해결방법 ### Error querying database. Cause: java.lang.NumberFormatException: For input string: “y” ### Cause: java.lang.NumberFormatException: For input string: “y” myBatis 사용시 위와 같은 에러가 발생하는 경우가 있다. 원인을 살펴보면 다음과 같은 형식의 문자열 비교 구문에서 에러가 발생하는 것을 확인할 수 있다. 1 2 3 <if test= ”stringValue == ‘Y’” > AND A.COLUMN1 = #{condition} </if> view raw gistfile1.xml  hosted with ❤ by  GitHub 분명 문자열 비교 구문인데  NumberFormatException 이 발생하는 상황이다. 결론적으로 위 현상은 myBatis 문제는 아니고  OGNL (Object Graph Navigation Language) 의 문제이다. OGNL 인터프리터에서는 위 구문의  ‘Y’ 를  char  형으로 인식하고,  ‘YY’ 나  “Y” 는  String 으로 인식한다. (따옴표를 잘보자) 그래서  <if test=”stringValue == ‘Y’”>  이와 같은 구문을 비교할 때  NumberFormat으로 비교를 시도하여 Exception이 발생한다. 이유는 java의 char형은 실제로 문자의 코드값을 저장하기 때문이다. 그래서 아래와 같은 형변환이 가능하다. 1 2 char y = 'Y' ; int code =

jstl:fmt 정리

출처 : http://noritersand.tistory.com/256 기능 : 지역, 메시지 형식, 숫자 및 날짜형식 directive : <%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %> 목차 requestEncoding setLocale bundle setBundle message formatNumber parseNumber formatDate parseDate setTimeZone, timeZone 국제화 및 지역화 태그로 다국어 문서를 처리할 때 유용하고, 날짜와 숫자 형식을 다룰 때 사용된다. I18N - 국제화(Internationalization) 태그라고도 한다. requestEncoding request.setCharacterEncoding() 역할이 같다. <fmt:requestEncoding [value="charsetName"]/>  setLocale 다국어를 지원하는 페이지를 만들때 ResourceBundle로 불러오는 properties 파일들과 연계하여 사용한다. <fmt:setLocale value="locale"         [variant="variant"]         [scope="{page|request|session|application}"]/> <% @   page  language = "java"  contentType = "text/html; charset=UTF-8"  pageEncoding = "UTF-8" %>      <% @  taglib prefix = "c"  uri = "http://java.sun.com/jsp/jstl/cor