Spring

💻 Programming/Spring

[Spring] 게시판 - 검색(Search) 기능 구현하기

Paging 처리 후 검색(Search) 기능 추가 (제목, 본문, 작성자) 앞서 페이징 처리를 해주었고 이번에는 검색 기능을 추가하였다. 검색창에서 제목, 본문, 작성자를 선택하여 검색할 수 있다. 또한 검색 결과도 페이징 처리하여 화면에 10개씩 보여준다. 1. Pager.jsp - 검색에 사용할 변수 search, kind를 추가한다 - Getter 와 Setter 도 추가해준다 - getSearch() : 검색창에 아무 값도 들어있지 않을 때 null이 아니라 공백을 넣어준다. --> 1 페이지를 보여줌 //---------------검색 사용 변수 ------------------- private String search; private String kind; // Getter & Setter ..

😎 Today I Learned

[TIL] 22.02.16

Today I Learned MyBatis 란? - SQL문을 Java에서 분리하여 XML에 등록하고 연결해서 사용 1) MyBatis Library 다운 - pom.xml 에 추가 2) Sample XML 생성 root-context -> DB 객체 생성 database-context.xml 생성 -> DB 연결 database.properties -> ID, PW 등 담기 (깃허브에 연동 X) - 공식주소 : https://mybatis.org mybatis mybatis.org - 참조문서 : https://mybatis.org/mybatis-3/ mybatis – MyBatis 3 | Introduction What is MyBatis? MyBatis is a first class persiste..

😎 Today I Learned

[TIL] 22.02.15

Today I Learned Model 데이터 보낼때 Request 대신 Model 사용하기 Forward 와 Redirect DI public class A {} @Component public class B extends A {} : bean name - b @Component("hi") public class C extends A {} : bean name - hi ... @Autowired @Qualifier("hi") private A test; //C가 대입 @Autowired private A hi; //C가 대입 프로젝트 생성 후 기본 설정 pom.xml web.xml JUnitTest 도구 준비

😎 Today I Learned

[TIL] 22.02.14

Spring Detail 페이지 작성 Controller url?age=20&ki=185.3&name=k Controller - request public void test(HttpServletRequest request) { String a = request.getParameter("age"); int age = Integer.parseInt("a"); String k = request.getParameter("ki"); double ki = Double.parseDouble("k"); String name = request.getParameter("name"); } - 파라미터값 반환시 데이터타입과 매개변수명을 파라미터의 이름과 타입을 일치 public void test(int age, double ..

😎 Today I Learned

[TIL] 22.02.11

Today I Learned Spring - Request : 요청의 모든 정보를 담고 있음 - Response : Client의 요청의 결과물을 Server가 Client로 보냄 Spring 과 DB 연동 - mvnrepository.com 에서 필요한 라이브러리 검색 후 복사 - pom.xml에서 dependency 추가 - DBConnector 생성 Servlet JSP Tomcat - 사용 * Collection 반복 - Request : HttpServletRequest & Response : HttpServletResponse - Parameter - Attribute

😎 Today I Learned

[TIL] 22.02.10

Today I Learned DI (Dependency Injection) JSP, CSS - 사이트 참고해서 게시판 페이지 수정

💻 Programming/Spring

[Tomcat/Error] 서버 에러 : Several ports (8005, 80) required by Tomcat v9.0 Server at localhost are already in use.

Several ports (8005, 80) required by Tomcat v9.0 Server at localhost are already in use. The server may already be running in another process, or a system process may be using the port. To start this server you will need to stop the other process or change the port number(s). 톰캣이 사용하는 포트가 사용중이어서 발생한 오류이다. cmd 창을 열어 사용중인 포트와 pid를 확인한다 netstat -p tcp -ano 8005 포트가 에러떴으므로 8005의 pi..

😎 Today I Learned

[TIL] 22.02.09

Today I Learned STS3와 Tomcat 연동하기 [Spring] STS3(Spring Suite 3) Server Tomcat 연동하기 STS3 WAS 연동 - Tomcat (Tomcat 9.0) 사용하여 연동하기 순서 : 환경변수 등록 -> STS3 Tomcat 연동 1. 우선 톰캣을 다운로드 하고 압축을 해제해준다. 10.0 버전은 오류가 나서 다시 9.0을 다운 받았다. https:/.. sooz.tistory.com Spring MVC Project 생성

💻 Programming/Spring

[Spring] STS3(Spring Suite 3) Server Tomcat 연동하기

STS3 WAS 연동 - Tomcat (Tomcat 9.0) 사용하여 연동하기 순서 : 환경변수 등록 -> Encoding 수정 -> STS3 Tomcat 연동 1. 우선 톰캣을 다운로드 하고 압축을 해제해준다. 10.0 버전은 오류가 나서 다시 9.0을 다운 받았다. https://tomcat.apache.org/download-09.cgi Apache Downloads We suggest the following site for your download: https://dlcdn.apache.org/ Alternate download locations are suggested below. It is essential that you verify the integrity of th..

soozkim
'Spring' 태그의 글 목록 (2 Page)