개발/국비교육
-
(국비교육) 30 - Spring + MVC패턴 + 전자정부 페이징 + Spring jar 세팅 + MyBatis개발/국비교육 2023. 7. 12. 17:54
■ workspaceSpring 스프링 툴을 사용하기 위해서 이클립스 대신 다음을 사용한다. 우리는 sts(Spring Tool Suite) 3버전 쓰고 있다. 스프링 부트 시작할 때 알아야 하는 것 | 요즘IT (wishket.com) 스프링 부트 시작할 때 알아야 하는 것 | 요즘IT 스프링은 장점이 많은 개발 도구이지만 설정이 매우 복잡하다는 단점이 있습니다. 그래서 스프링을 개발팀에서도 이런 단점을 인식하고 단점을 보완하고자 스프링 부트를 출시했습니다. 스프 yozm.wishket.com ■ 폴더 x 오류 고치기 버전이 안맞아서 x 표시 뜬다. 아래 Problems 애서 Quick Fix 클릭해준다. 버전을 11버전으로 선택 후 클릭하면 고쳐진 것 확인 가능! spring starter proje..
-
(국비교육) 29 - 3회차 시험 + 500번 오류 + Spring 다운로드 + maven 이용하기 + JSTL + Github 이용하기 + Github 토큰생성개발/국비교육 2023. 7. 11. 12:06
■ 500번 오류 * team.jsp if (list != null) 이 없다면 어떻게 될까? 먼저 get 으로 돌게 되는데, get 으로 왔을 때 list 가 없어서 오류가 난다. 따라서 오류를 막기 위해 if 를 통해 값이 없을 경우 for 문 돌리지 말고, do post 로 가서 있을때는 돌아 라는 의미이다. ■ Spring 이용해보기 (하단 사이트 링크) projects -> spring tools 4 클릭 https://spring.io/ Spring | Home Cloud Your code, any cloud—we’ve got you covered. Connect and scale your services, whatever your platform. spring.io 맨 하단 3버전 설치 문구..
-
(국비교육) 28 - 팀뽑기 웹버전 만들기개발/국비교육 2023. 7. 10. 21:43
■ 이번주/이번달 목표 ■ 팀뽑기 웹사이트에 나타내기 *menu.jsp 팀뽑기 웹사이트로 나타내기 위해 아래 링크로 연결되는 코드 넣어준다. 팀 서블릿 만들어주기 * Team.java do get 통해서 jsp 가져오기 * team.jsp 먼저 버튼 만들어주고 액션 설정해준다. team.jsp 생성해주고 겹치지 않도록 post 처리 해준다. 세부 옵션 설정 입력 후 팀 만들기 버튼 누르면 출력 확인 가능 * 에러해결 /team 소문자처리 안해줘서 못가져와서 오류 남 따라서 소문자 처리하니 오류 해 * Team.java team.jsp 에 있는 값 names 를 getParamaeter 을 통해 가져오고, 그 값을 names 변수에 저장해준다. 해당 값을 , 로 구분하여 배열에 넣어준다. 이를 add 함수..
-
(국비교육) 27 - 게시판 꾸미기 3 + summernote + 위지위그 + 자바스크립트개발/국비교육 2023. 7. 7. 17:57
■ 엔터키 적용해주기 * Write.java 게시판에 글 작성하면 엔터처리 안된다. 왜냐하면 자바로 작성된 글자가 html 언어가 먹히지 않았기 때문이다. 따라서 서블릿으로 돌아가서 문자를 바꿔주는 코드를 작성해야 한다. 여기서 replace 를 써준다. ※ replaceAll 써도 된다. - replace 모두 바꿔줘요 - replaceAll 모두 바꿔줘요. + 정규식 - replaceFirst 하나만 바꿔요. replace(old data, 바꿀내용) 한 내용을 content 에 담아주고 이를 출력한다. 확인 후 서버를 다시 시작하면 다음과 같이 엔터처리 됨을 확인할 수 있다. ■ summernote 활용하기 (하단 홈페이지 링크 참고) 위지위그(WYSIWYG: What You See Is What ..
-
(국비교육) 26 - 게시판 꾸미기 2 + executeUpdate + 자바스크립트 + 호이스팅 + var + let개발/국비교육 2023. 7. 6. 16:43
■ 글쓰기 버튼 만들기 * board.jsp 하단에 onclick 만들어준다. onclick : 버튼을 클릭했을 할 동작 즉 우리는 글쓰기 버튼을 눌렀을 때 새로운 페이지로 연결할 것이다. 이제 이를 서블릿으로 연결해줄 것이다. * Write.java Write 에 해당하는 servlet 만들어준다. 서블릿 내 @WebServlet 부분은 소문자로 변경해준다. 정상적으로 연결되는 것을 볼 수 있다. 이제 우리는 글쓰기 화면을 불러오고 로그인 여부를 검사하는 if 문을 만들어준다. 먼저 이를 위해서 RequestDispacher 를 통해 우리가 사용할 write.jsp 와 연결해준다. ※ do Get 과 do Post 차이 servlet을 사용하는 이유는 전송 방식의 차이를 두기 위해서다. do get 은..
-
(국비교육) 25 - 게시판 꾸미기개발/국비교육 2023. 7. 5. 16:59
■ 게시판 꾸미기 a 태그로 제목이 묶여 있다. tr: hover 는 마우스를 선택 시 나오는 효과이다. tr: hover 만 했을 경우 제목 효과는 적용되지 않는 것을 볼 수 있다. 제목도 동일한 효과를 주기 위해 a 태그로 묶인 tr: hover a 도 함께 묶어줘서 효과를 동시에 준다. , 를 사용하여 반복없이 효과 주는 것이 가능하다. 오류 뜨는 이유는 list 를 만들지 않고 불렀기 때문이다. 따라서 list 를 통해 DTO 정보를 가져와야 함으로 이에 해당하는 DAO 를 생성해줘야 한다. ■ DBConnection 만들기 데이터 베이스에 있는 정보를 가져오기 위해 DB를 연결해줄 수 있는 DB Connection 클래스가 필요하다. 먼저 다운받은 mariadb jar 파일을 lib 안에 넣어줘..
-
(국비교육) 24 - 네트워크 + 아이피 주소 찍기 + 소켓 통신 + 채팅 만들기 + 서블릿으로 게시판 만들개발/국비교육 2023. 7. 4. 17:00
■ 네트워크 네트워크 : 컴퓨터 두 대 이상을 하나의 케이블로 연결함 java.net * 서버와 클라이언트 - 컴퓨터간의 관계 / 하나의 서버에 여러 클라이언트가 연결된 형태 - 서버 : 서비스를 제공합니다. - 클라이언트 : 서버가 제공하는 서비스를 제공받는다. - P2P : 클라이언트가 서버 역할을 동시에 수행하는 것 * IP : 네트워크 상에서 고유한 자신의 주소. - IPV4 : 173.100.116.50 / 192.168.0.1 - IPV6 (128비트) FFED:0:0:0:0:BA98:3210:4562 * port ftp: 21 ssh: 22 http: 80 mariadb: 3306 oracle: 1502 mail: 25 ■ 아이피 주소 찍어보기 자바에서 IP 주소를 표현할때 사용하는 클래스 ..
-
(국비교육) 23 - vs code 및 확장팩 설치 + 이미지/영상 연결 + 리스트 + 애플 홈페이지 만들기 + vs code 단축키개발/국비교육 2023. 7. 3. 18:03
■ vs code 설치하기 (하단 다운로드 링크 有) 다운로드 클릭 후 다음 버튼 계속 누르면 된다. Visual Studio Code - Code Editing. Redefined Visual Studio Code - Code Editing. Redefined Visual Studio Code is a code editor redefined and optimized for building and debugging modern web and cloud applications. Visual Studio Code is free and available on your favorite platform - Linux, macOS, and Windows. code.visualstudio.com open folder..