분류 전체보기
-
Spring boot cmd에서 빌드하고 서버 실행하기JAVA/Spring(Springboot) 2021. 6. 29. 22:18
Spring boot 에서 만든 프로젝트를 빌드하고 cmd 에서 서버를 실행시킬 수가 있다 우선 cmd 를 실행하고 프로젝트를 저장한 폴더까지 이동한다 이 폴더 구조가 나올때까지 이동하면 된다 cd 명령어를 통해 폴더를 이동한다 빌드를 하기 위해 위 폴더의 gradlew 파일을 실행시켜줘야 한다 gradlew build gradlew build 명령어를 입력하면 빌드가 시작되고 BUILD SUCCESSFUL 이 뜬다! dir 를 입력해 폴더 구조를 보면 build 라는 폴더가 있다 build 폴더로 이동하자 build 폴더 및 libs 폴더로 이동 후 구조를 살펴보면 빌드 된 jar 파일이 있다 파일 크기가 큰 hello-spring-0.0.1-SNAPSHOT.jar 를 java -jar 명령어로 실행시..
-
스프링부트 실행 시 로그인하라는 오류JAVA/Spring(Springboot) 2021. 6. 28. 21:22
스프링 부트 프로젝트를 생성하고 실행시 Console 창에 Err 와 함께 인터넷에서 localhost:8080 로 접속 시 로그인을 하라는 팝업창이 뜬다 취소를 누르니 권한이 없다는 메세지가 적힌 페이지가 나온다... Console 창을 보니 port 번호가 겹친다는 내용이 적혀 있었고 port 번호를 바꾸는 방법을 알아보았다 스프링 부트 port 바꾸는 방법 src > main > resources > application.properties 를 더블클릭 한다 그럼 빈화면이 나오는데 거기에 원하는 port 번호를 입력하면 된다 server.port=8090 localhost:8090 으로 다시 접속한 결과 원하는 페이지가 나왔다
-
SQLD 2021년 시험일정 및 41회차 시험후기자격증 2021. 6. 25. 10:56
SQLD 41회차 시험을 5월 29일 토요일에 쳤다 장소는 부산 신라중학교! 신라중학교 주차장은 이상하게도 신라대학교를 통해서 들어가야하기때문에 초행길이라면 택시를 추천한다! 시험은 10시에 쳤고 시험시간은 1시간 30분. 중도퇴실은 10시 30분부터 가능했다 SQLD 시험이란? SQLD 시험이란 한국데이터산업진흥원에서 주관하는 SQL 개발자 시험이다 국가공인자격증으로 일년에 4번씩 칠 수 있는 시험이다 합격 후 1년 반이 지나고 보수교육을 들으면 영구적으로 가질 수 있는 자격증이다 시험준비기간은 2주~한달 정도로 실제 현업을 하고 계신분이라면 2주면 적당한 기간이다 SQL 에 대한 지식이 개발자뿐 아니라 점점 다른 분야에서도 필요하다고 들었기때문에 하나쯤 있으면 좋은 자격증인것 같다 시험 일정 필자는 ..
-
[JAVA] Ecplise 삭제하고 다시 설치하기JAVA 2021. 6. 9. 09:15
Eclipse 를 재설치하는 경우 여러 기존에 여러 Eclipse 가 설치되어 헷갈리는 경우가 있다 이럴 때 기존의 Eclipse 를 전부 삭제하면 되는데 삭제하기 위한 방법을 알아보겠다 1. C:\사용자 폴더에서 .p2 와 .eclipse 폴더를 삭제한다 2. Eclipse 의 workspace 를 삭제한다 workspace 의 위치를 모른다면 Eclipse 에서 확인할 수 있다 3. Eclipse 를 설치한다 Eclipse Downloads | The Eclipse Foundation The Eclipse Foundation - home to a global community, the Eclipse IDE, Jakarta EE and over 375 open source projects, includ..
-
[JAVA/SWT] Table Header 클릭으로 Table 정렬하는 방법JAVA/SWT 2021. 6. 4. 11:47
SWT Table 생성 시 데이터의 정렬을 하는 방법을 알아보자 1. Table 을 가지고 있는 Class 에 SelectionListener 를 인터페이스를 구현하고 method overriding 을 한다 @Override public void widgetDefaultSelected(SelectionEvent arg0) { // TODO Auto-generated method stub } @Override public void widgetSelected(SelectionEvent event) { // TODO Auto-generated method stub } 2. HeadColumn 인 TableColumn에 listener 를 add 한다 ex) TableColumn 이 columnModel, c..
-
[JAVA/SWT] 다른 Thread 에서 Cursor 모양 변경하는 방법JAVA/SWT 2021. 6. 3. 11:30
SWT 에서 UI Thread 가 아닌 다른 Thread 로 돌리면서 Cursor 모양을 변경하는 방법에 대해 알아보겠다 1. 새로운 Operation Class 에 setCursor 함수를 정의한다 Opartaion Class 에서는 UI 클래스를 인자로 가지고 있어야한다 private void setCursor(final int intClass) { Display.getDefault().asyncExec(new Runnable() { @Override public void run() { if(UI클래스 != null) { UI클래스.getShell().setCursor(new Cursor(Display.getDefault(), intClass)); } } }); } 2. Operation 함수 내에서..
-
JAVA Excel 읽고 쓰기JAVA 2021. 6. 2. 13:59
JAVA 에서 Poi 라이브러리를 사용하면 EXCEL 을 편집할 수 있다 기존 Excel 파일을 읽어서 그 위에 새롭게 편집을 하고 싶을 때 사용하면 좋은 예제이다 위 엑셀 파일에서 메뉴1, 메뉴2, 메뉴3 인 Header 에 메뉴4, 메뉴5 를 추가하고 싶고 Cell 의 값을 새로 바꾸고 싶다 Excel 읽고 쓰기 순서 엑셀 파일을 읽고 다시 쓸 필요가 있다 그 순서는 아래와 같다 1. FileInputStream 으로 파일 읽기 2. XSSFWorkbook 객체 생성하기 3. XSSFSheet 객체 생성 4. XSSFRow 첫번째 Row 가져와서 수정하기 5. 2번째 Row 부터 데이터 삽입 6. FileOutputStream 으로 파일 저장하기 7. 자원반환 Code 코드로 1~5 을 살펴보자 St..