728x90

 

에자일 방법론은 다음의 4가지 선언에서 시작되었다고 한다.

1. 프로세스나 툴 보다는 멤버간의 교류를 소중히 여길 것.

2. 포괄적인 문서에 힘을 쏟기 보다는 동작하는 소프트웨어의 개발에 힘을 기울일 것.

3. 계약의 협상보다는 고객과의 협력을 중시할 것.

4. 계획에 따르기 보다는 변화에 유연하게 대응할 것.

728x90

'프로그래밍 > java' 카테고리의 다른 글

에러코드 정리  (0) 2016.05.25
스프링 DI  (0) 2016.03.29
java.lang.UnsupportedClassVersionError  (0) 2016.03.28
java 윤년, 평년 구분하기  (0) 2016.01.18
마이바티스 메뉴얼  (0) 2015.08.26
728x90

java.lang.UnsupportedClassVersionError 

(Unsupported major.minor version 49.0)  <- 이거 중요하다. 잘 외워두자

이 에러는 자바의 컴파일 버전이 충돌이 나서이다.
하위버전의 클래스파일을 상위버전이 읽어들일때는 상관없지만 
상위버전의 클래스파일을 하위버전이 읽어올때는 위와 같은 에러를 낸다

< 에러 상세코드 >
version 50.0   컴파일 버전 : 1.6 
version 49.0   컴파일 버전 : 1.5
version 48.0   컴파일 버전 : 1.4

해결책>>

내텀퓨터 ->속성 -> 고급-> 환경변수에서 자바의 버전을 알맞게 셋팅한다. 
즉... 상위 버전에서 컴파일된 파일들은 모두 자신이 현재 쓸려고 하는 하위버전대로 다시 컴파일 하여야 한다.


진짜 해결>>

컴파일시 발생하는 Unsupported major.minor version 49.0 에러 원인 

Unsupported major.minor version 49.0 에러 딱보니 버전문제다.
JRE 라이브러리 버젼을 통일시켜 주었는데도 안된다.
뭐가 문제냐!! 바로 컴파일시 JDK버젼이 문제였다.
프로젝트 프로퍼티에서 Java Compiler탭에서 Compiler compliance level을 설정을 변경해주자

이상 끝~
컴파일러의 jre 버전이 5.0 인데 웹서버 (톰켓)의 jre 버전이 1.4이거나 낮은 버전일 경우 다음과 같은 에러가 발생한다


참조] http://mars0717.egloos.com/1061030



728x90

'프로그래밍 > java' 카테고리의 다른 글

스프링 DI  (0) 2016.03.29
에자일 방법론  (0) 2016.03.29
java 윤년, 평년 구분하기  (0) 2016.01.18
마이바티스 메뉴얼  (0) 2015.08.26
spring unchecked warning 발생 시 대처 법  (0) 2015.08.05
728x90

GregorianCalendar gc = new GregorianCalendar();

int year = gc.get(Calendar.YEAR);

// 윤년 or 평년 : true -> 윤년 , false -> 평년

String resYmd = gc.isLeapYear(year) ? "윤년" : "평년";

System.out.printf("%d 년도는 %s 입니다.", year, resYmd);


728x90

'프로그래밍 > java' 카테고리의 다른 글

에자일 방법론  (0) 2016.03.29
java.lang.UnsupportedClassVersionError  (0) 2016.03.28
마이바티스 메뉴얼  (0) 2015.08.26
spring unchecked warning 발생 시 대처 법  (0) 2015.08.05
Java 정규식  (0) 2015.07.24
728x90

MyBatis-3-User-Guide.pdf



MyBatis-3-User-Guide_ko.pdf



마이바티스 3.0 메뉴얼입니다.

728x90

'프로그래밍 > java' 카테고리의 다른 글

java.lang.UnsupportedClassVersionError  (0) 2016.03.28
java 윤년, 평년 구분하기  (0) 2016.01.18
spring unchecked warning 발생 시 대처 법  (0) 2015.08.05
Java 정규식  (0) 2015.07.24
오픈소스 링크  (0) 2015.06.26
728x90

ava6에서 프로그래밍을 하다보면 다음과 같은 에러가 발생하곤 한다.

이클립스에서는 아래와 같이 노란줄로 경고를 표시해 줍니다.



이럴 때, 메소드 위에 아래와 같이 한줄만 추가해 주시면 바로 해결됩니다.

@SuppressWarnings("unchecked")


이클립스(eclipse)에서 경고가 사라졌습니다.

이 어노테이션(annotation)은 비확인 경고(unchecked warning)를 제거해 줍니다.

이 어노테이션(annotation)은 실행에 아무런 영향을 주지 않으므로 마음껏 사용해도 무방합니다.


@SuppressWarnings 어노테이션(annotation)에 관한 내용은 아래 내용 참고하세요.

all : 모든 경고  

cast : 캐스트 연산자 관련 경고

dep-ann : 사용하지 말아야 할 주석 관련 경고

deprecation : 사용하지 말아야 할 메서드 관련 경고

fallthrough : switch문에서 break 누락 관련 경고

finally : 반환하지 않는 finally 블럭 관련 경고

null : null 분석 관련 경고

rawtypes : 제너릭을 사용하는 클래스 매개 변수가 불특정일 때의 경고

unchecked : 검증되지 않은 연산자 관련 경고

unused : 사용하지 않는 코드 관련 경고


http://zzznara2.tistory.com/181

728x90

'프로그래밍 > java' 카테고리의 다른 글

java 윤년, 평년 구분하기  (0) 2016.01.18
마이바티스 메뉴얼  (0) 2015.08.26
Java 정규식  (0) 2015.07.24
오픈소스 링크  (0) 2015.06.26
java get 방식 한글 전송 시  (0) 2015.05.26
728x90

[공지]java 정규식 문법   일반 / JAVA  

2011.11.20. 02:04

복사http://blog.naver.com/beabeak/50126941465

전용뷰어 보기

정규표현식 문법

^ : 문자열의 시작을 나타냄. 

$ : 문자열의 종료를 나타냄. 

. : 임의의 한 문자를 나타냄. (문자의 종류는 가리지 않는다)

| : or를 나타냄. 

? : 앞 문자가 없거나 하나있음을 나타냄. 

+ : 앞 문자가 하나 이상임을 나타냄. 

* : 앞 문자가 없을 수도 무한정 많을 수도 있음을 나타냄. 

[] : 문자 클래스를 지정할 때 사용한다. 문자의 집합이나 범위를 나타내며 두 문자 사이는 '-' 기호로 범위를 나타낸다. 

      []내에서 ^ 가 선행하여 나타나면 not 를 나타낸다. 

{} : 선행문자가 나타나는 횟수 또는 범위를 나타낸다. 

a{3} 인 경우 a가 3번 반복된 경우를 말하며, a{3,}이면 a가 3번 이상 반복인 경우를 말한다. 또한 a{3,5}인 경우 

a가 3번 이상 5번 이하 반복된 경우를 나타낸다. 

( ): 소괄호 ‘( )’ 특수문자는 ‘( )’ 특수문자 안의 글자들을 하나의 문자로 봅니다. 예를 들어 ‘gu(gg){2}le’ 와 같은 패턴을 작성하게 되면    

     ‘guggggle' 문자열이 문자열에 포함되어 있어야 됩니다.

|: 패턴 안에서 OR연산을 사용할 때 사용합니다. 예를 들어 'hi|hello' 는 hi 나 hello 가 포 함되어있는 문자열을 의미합니다.

\w : 알파벳이나 숫자

\W : 알파벳이나 숫자를 제외한 문자

\d : 숫자 [0-9]와 동일

\D : 숫자를 제외한 모든 문자

\: 위의 각 기능에서 벗어납니다(escape).

(?i): 앞 부분에 (?i) 라는 옵션을 넣어주면 대소문자를 구분하지 않는다 (물음표+소문자i(아이))

 

java 에서 사용되는 문법

\p(Alpha): 대,소문자 아파벳

\p(Digit): 숫자를 의미한다. 

\p{Alnum}: 대, 소문자 알파벳, 숫자를 의미함.

-->[\p{Alnum}] : 아파벳, 숫자 중 한 문자를 의미한다. 

 

기본적인 문자열 검증 정규식

 

^[0-9]*$  :  숫자만

^[a-zA-Z]*$  :  영문자만

^[가-힣]*$  :  한글만

^[\uac00-\ud7af]*$  :  한글만 // unicode를 사용한 한글 식별 처리.

^[a-zA-Z0-9]*$  :  영어/숫자만

.+ : 한문자 이상의 전체문자를 표시한다.

 

정규식 표현 예제

이메일 : ^[a-zA-Z0-9]+@[a-zA-Z0-9]+$  or  ^[_0-9a-zA-Z-]+@[0-9a-zA-Z-]+(.[_0-9a-zA-Z-]+)*$ 

휴대폰 :  ^01(?:01[6-9]) - (?:\d{3}\d{4}) - \d{4}$ 

일반전화 : ^\d{2,3} - \d{3,4} - \d{4}$

주민등록번호 : \d{6} \- [1-4]\d{6}

IP 주소 : ([0-9]{1,3}) \. ([0-9]{1,3}) \. ([0-9]{1,3}) \. ([0-9]{1,3})

파일확장자: ([^\s]+(\.(?i)(jpg|png|gif|bmp))$)

 

javascript 문자열 추출

var url = '10/url.do?chartId=kkkk&chgg=kiii';

var reg = /[?&]chartId=([^&]*)?/g

//var reg = /chartId=(.*)?&?/g

values =  reg.exec(url);

display.innerHTML = values;

 

* 주의 사항: group을 이용하여 문자열을 추출 할 때는 ()안에 명확한 정규식을 써야 한다. 

위의 // 주석으로 처리된 부분처럼 (.*) 표현하면 나머지 문자열을 모두 추출해버린다. 

 

클래스 사용 예.

A typical invocation sequence is thus  

Pattern p = Pattern.compile("a*b"); 

Matcher m = p.matcher("aaaaab"); 

boolean b = m.matches();

 

A matches method is defined by this class as a convenience for when a regular expression is used just once. 

This method compiles an expression and matches an input sequence against it in a single invocation. The statement  

 

boolean b = Pattern.matches("a*b", "aaaaab");


# 정규식을 이용한 금칙어 조회 샘플 

 public void checkBadWord(){

  String regPice = "[0123456789 \\?+-\\.,!@#$%\\^&\\*\\(\\);\\\\\\/\\|<>\\\"\\']*";

  String subsPice= "\\?";

  

  String samplePattern = "변?태";

   

  

  String checkRegex = samplePattern.replaceAll(subsPice, Matcher.quoteReplacement(regPice));

  System.out.println(checkRegex);

  

  String[] sampleWords=new String[]{"변?태","변***태","경기도 변()태님", "변///\\태짓을"};

  

  Pattern ptrn = Pattern.compile(checkRegex);

  for(String word: sampleWords){

   Matcher matcher = ptrn.matcher(word);

   boolean check = matcher.find();

   if (check){

    System.out.println(word+" check:"+check+", 체크 단어:"+matcher.group());

   }

  }

 }




정규식 테스트 사이트

RegExr: http://gskinner.com/RegExr/ 

 

참고 사이트

자바, javascript, oracle 정규식: http://litlhope.springnote.com/pages/1786498

자바 정규식 간단 설명: http://twinstarbox.tistory.com/entry/Java-%EC%A0%95%EA%B7%9C%EC%8B%9D%EC%9D%B4%EB%9E%80-%EB%AC%B4%EC%97%87%EC%9D%B8%EA%B0%80

URL 정규식으로 분리하기: http://goodidea.tistory.com/86

 

 

[출처] java 정규식 문법|작성자 완전컴맹

728x90
728x90

1. 오픈 소스 소프트웨어 이야기

할리데이비슨과 HOG(Harley Owners Group) 이야기
    https://en.wikipedia.org/wiki/Harley-Davidson 

위키피디아 이야기
    https://en.wikipedia.org/wiki/Wikipedia

Open Source Software (라이선스) 정의, Open Source Initiative
    http://opensource.org/

블랙덕과 NorthBridge의 Open Source  시장 조사 결과(slide)
    http://www.slideshare.net/blackducksoftware/2015-future-of-open-source-survey-results

Open Source 라이선스 분류
    http://opensource.org/licenses/category

주로 사용되는 Open Source 라이선스 상위 20개
    https://www.blackducksoftware.com/resources/data/top-20-open-source-licenses

Hellwig and VMware Case
    http://www.ifross.org/artikel/hellwig-vs-vmware-gpl-enforcement-lawsuit-hamburg-district-court

라이선스 위반을 찾아내는 Binary Analysis 도구 1 (Fossology)
    http://www.fossology.org/projects/fossology

라이선스 위반을 찾아내는 Binary Analysis 도구 2 (Tjaldur Software Governance Solutions)
    http://www.binaryanalysis.org/

SK-Telecom의 오픈소스 거버넌스
    http://j.mp/sktoss

Open Source Hosting Site (Repositorty, Project Hosting)
    http://github.com
    http://code.google.com  <-- 2016년1월25일 종료 예정
    http://bitbucket.org
    http://sourceforge.net
    http://savannah.gnu.org   <-- GNU Project Hosting
    http://dev.naver.com
    http://www.codeplex.com   <-- Microsoft의 오픈소스

Wikipedia의 Open Source Repository List
    http://en.wikipedia.org/wiki/Comparison_of_open-source_software_hosting_facilities

Free Open Source Software Wiki
    http://freeopensourcesoftware.org/

Wikipedia Open Open Software List
    https://en.wikipedia.org/wiki/List_of_free_and_open-source_software_packages

BlackDuck이 운영하는 오픈소스 프로젝트 Database: Openhub
    https://www.openhub.net/

구글 오픈소스 라운드테이블 참가 후기와 기사 링크
    http://hl1itj.tistory.com/41

오픈소스 개발 방법론 - Mozilla 사례 중심 (2010)   by 윤석찬
    http://www.slideshare.net/Channy/opensource-devprocess

제주대학교-다음 오픈소스 클래스 강좌 홈페이지 by 윤석찬
    https://code.google.com/p/open-source-class/

The Origins and Future of Open Source Software (white paper)
    http://www.netaction.org/opensrc/future/oss-whole.html

오픈소스 소프트웨어의 기술혁신 특성:리뷰
    http://korea.gnu.org/people/chsong/copyleft/ost.pdf

Netty 개발자 이희승(트위터) 커미터, 성지순례 사이트
    http://j.mp/1GA6JCx

레이어 별 오픈소스  by 최지웅
    http://www.slideshare.net/ienvyou/ss-20866165

공개SW 전환방법 및 전략 by 김형태
    http://www.slideshare.net/chaeya/sw-27383935

한국 오픈 소스 커미터 목록 (KDLP)
    https://wiki.kldp.org/wiki.php/KoreanOpenSourceCommitter

Open Source iOS Apps – Real iOS Source Code Examples
    https://maniacdev.com/2010/06/35-open-source-iphone-app-store-apps-updated-with-10-new-apps

성당과 시장 (한빛출판사 무료 ebook) – Eric Raymond
    http://korea.gnu.org/people/chsong/cb/catb-ko-20140121.pdf

오픈소스로 개발 실력 쌓기  by 진성주 (아파치 usergrid 커미터)
    http://www.slideshare.net/kthcorp/h3-2012-15042338

Head of Open Source Software (OSS) – OSS 헤드 구인 광고
    http://jobs.electronicsweekly.com/job/1401338395/head-of-open-source-software-oss-/

오픈 소스, 왜 해야 하나? – by 김수보
    https://subokim.wordpress.com/2011/09/28/why-open-source/

왜 공개소스 소프트웨어여야 하나? – by 이민석
    http://tosahara.blogspot.kr/2011/10/blog-post.html


2. Open Source ALM

Open Source ALM Solution
    http://pseg.or.kr/pseg/osalm

Redmine (Project Management)
    http://www.redmine.org/

Eclipse (IDE tool)
    http://www.eclipse.org/ide/

git (Distributed Source Control)
    http://git-scm.com/

Gerrit (Code Review)
    https://code.google.com/p/gerrit/

SonarQube (Code Quality Tool)
    http://www.sonarqube.org/

Maven (Build Tool)
    https://maven.apache.org/

Jenkins (Continuous Integration)
    https://jenkins-ci.org/


3. GITHUB & GIT & Code Review

GITHUB Education Pack
    https://education.github.com/pack

GITHUB의 활동을 바탕으로 랭킹, 이력서 등을 만들어주는 사이트들
    http://rankedin.kr/
    http://git.io/top
    https://code.google.com/p/gitinspector/
    http://resume.github.io/
    http://git.io/top
    http://ghv.artzub.com/
    https://www.openhub.net/people

예제 Repository (test-repo)
    https://github.com/hl1itj/test-repo

Markdown 언어 예제
    http://www.unexpected-vortices.com/sw/rippledoc/quick-markdown-example.html

Git Download (PC, MAC용)
    http://git-scm.com/downloads

Git의 GUI clients
    http://git-scm.com/downloads/guis

Git Workflow
    http://blog.osteele.com/posts/2008/05/my-git-workflow/

Git 간단 사용기
    http://dev.azki.org/40

생활코딩의 Git 강좌
    https://opentutorials.org/course/1492

그리고 생활코딩 git 강좌의 동영상 모둠
    http://j.mp/git-class

맥에서 git 사용하기와 멋진 그림
    http://funnyrella.blogspot.kr/2014/04/97-git.html

Github 실습 by 신승엽
    http://www.slideshare.net/flyskykr/github-46014813

Github의 git 15분 만에 배우기 Tutorial (github 공식 튜토리얼)
    https://try.github.io/levels/1/challenges/1

git-치트시트.pdf
    http://j.mp/git_cheat_sheet

git을 시작하기 위한 간편 안내서
    http://rogerdudler.github.io/git-guide/index.ko.html

Progit (책 - git 설명서 - 영어)
    http://git-scm.com/book/en/v2

Git의 모든 것을 간단한 설명 그림 예제로 배우기 by atlassian
    http://j.mp/1fF6RLm

Git 사용자 설명서 by 김남형
    http://namhyung.github.io/git-user-manual-ko/

누구나 쉽게 이해할 수 있는 git 입문
    http://backlogtool.com/git-guide/kr/intro/intro1_2.html

SublimeText와 git 연동
    http://unikys.tistory.com/331

A System for Detecting Software Plagiarism
    http://theory.stanford.edu/~aiken/moss/


출처 : http://hl1itj.tistory.com/118

728x90
728x90

특정 경로(URL)를 특수 기호문제로 encoding 해야되는 경우 URLencode.escape("url 경로") 를 사용한다

 

=============================================== Example ===========================================

Ex)

String url = ""; //변환된 url를 담을 변수

String tempUrl = "/test/fold/test.jsp"; //변경할 url

link = URLencode.escape(tempUrl); //url encoding

= %2Ftest%2Ffold%2Ftest.jsp"// 슬러시(/) 기호가 %2F 로 치환된 것을 확인, &기도 등도 치환된다.

특정 값(value)를 UTF-8 or EUC-KR encoding 해야되는 경우 java.net.URLEncoder.encode("value", "type")를 사용

 

=============================================== Example ===========================================

Ex)

String encodeVal = java.net.URLEncoder.encode("가나다라", "UTF-8");

=> "가나다라" 를 UTF-8 로 인코딩(encoding)
String decodeVal = java.net.URLEncoder.encode(encodeVal, "EUC-KR");

=> UTF-8 로 인코딩 된 "가나다라" 를 EUC-KR 로 재 인코딩(encoding) => "가나다라" 가 원상복귀됨

 

728x90

'프로그래밍 > java' 카테고리의 다른 글

Java 정규식  (0) 2015.07.24
오픈소스 링크  (0) 2015.06.26
전자정부(Spring) Framework] iBatis 입력(INSERT) 결과  (1) 2015.05.19
java jdbc db instance 설정  (0) 2015.05.06
오라클 페이징  (0) 2014.07.23

+ Recent posts