Back end/Spring MVC
-
회원가입 -> 로그인 -> 조회 (~ crud 진행중)Back end/Spring MVC 2023. 12. 6. 18:37
crud 흐름을 정리 해보겠다. 그냥 학습하고 내 생각을 정리해서 적음 1. Project 셋팅 InteliJ , Mysql, mybatis, tomcat, jdk 18 사용 했음. 2. 회원가입 (controller -> (DTO) -> Service -> Repository 연결 ) - JSP -> Action,Method 값 설정 -> Controller에 보냄 -> url연결 :GetMapping, - 정보 전송(method:post): PostMapping 으로 전달 -> memberDTO 에 데이터(HTML의 name) 값들을 생성자(getter,setter) 및 tostring 값으로 설정 -> Controller의 POST 쪽에 데이터를 받아올@modelAttribute(MemberDTO ..
-
HttpSession 이란?Back end/Spring MVC 2023. 11. 30. 19:27
스프링 학습을 하면서 자세한 HttpSession이 궁금해짐 주로 로그인 기능을 설정할때 쓰는듯? HttpSession은 Java 웹 응용 프로그램에서 사용자 간의 상태 정보를 유지하고 관리하기 위한 인터페이스입니다. HTTP 프로토콜은 기본적으로 상태를 유지하지 않기 때문에, 각각의 HTTP 요청은 독립적이며 이전 요청과 상관이 없습니다. 이 때문에 사용자의 세션 상태를 유지하려면 추가적인 메커니즘이 필요합니다. HttpSession은 클라이언트와 서버 간의 지속적인 상태 유지를 지원하기 위해 사용됩니다. 주로 다음과 같은 상황에서 활용됩니다: 사용자 인증과 관련된 정보 유지: 로그인한 사용자의 정보를 세션에 저장하여 여러 페이지 간에 인증 정보를 공유할 수 있습니다. 장바구니와 같은 임시 데이터 저장..
-
스프링 프레임워크를 이해하기 위한 요소들Back end/Spring MVC 2023. 11. 24. 10:50
- 스프링 프레임워크를 잘 다루기 위해서는 여러 가지 측면에서 중요한 요소들이 있습니다. 아래는 스프링을 효과적으로 사용하기 위한 핵심 요소들입니다: 최신 버전의 스프링 학습: 스프링은 지속적으로 업데이트되고 발전하고 있습니다. 최신 버전의 스프링 프레임워크에 대한 이해와 활용은 새로운 기능과 최적화를 활용하는 데 중요합니다. 의존성 주입(Dependency Injection) 및 제어 역전(Inversion of Control) 이해: 스프링의 핵심 개념 중 하나는 의존성 주입과 제어 역전입니다. 이를 이해하고 활용하면 유지보수가 쉬우며 테스트하기 쉬운 코드를 작성할 수 있습니다. IoC 컨테이너 이해: 스프링은 IoC 컨테이너를 제공하여 객체의 생명주기와 의존성 관리를 자동으로 처리합니다. IoC 컨..
-
web.xmlBack end/Spring MVC 2023. 11. 12. 17:11
출저(인프런): 스프링부트 개념정리(이론) - 최주호 - 초기 파라미터 : 암구호라 생각하면 됨 세션: 권한 부여 내가 원하는 식별자를 알려주는것이 매핑 mime type: 너가 들어올 데이터의 타입이 뭐야?또한 데이터가 들어오면 데이터를 가공 해줌 아무것도 안들어오면 get방식: selet를 씀 즉 get방식은 데이터를 들고오지 않음 아무이유없이 들어온 사람을 따로 광장으로 보내는 것 에러가 나면 이상한 광장으로 보냄 필터는 그냥 말그대로 필터링 해주는것 리스너는 예를들어 술잘먹는 사람을 web.xml에 등록을 하면 우선 술을 먹여보고 잘마시면 데리고 오는것 말그대로 보안
-
서블릿 객체 생명 주기?Back end/Spring MVC 2023. 11. 12. 17:10
" 특별한 파일 요청을 할 수 없다 요청시에는 무조건 자바를 거친다" URL: 자원 접근 방식 URI : 식별자 접근 방식 ex) http://naver.com//a.png : URL http://naver.com/picture/a : URI request -> 서블릿 컨테이너(톰캣) 서블릿 객체 생성 (NEW) (2번째 객채 만들때는 재사용) init() service() -> post,get,put,delete get( ) : 스레드1 .. 스레드2..스레드3..스레드4 : DB연결,데이터,HTML 담아서 응답 ...post(),delete(),put() (java 자원 은 톰캣 작동) (html.css는 아파치작동) 톰켓 기본 설정 -> 스레드 Auto 20개를 설정하면 20명이 pull로 차면 2..
-
Spring < -> Spring BootBack end/Spring MVC 2023. 11. 7. 11:33
Spring과 Spring Boot는 모두 스프링 프레임워크를 기반으로 한 자바 웹 개발 프레임워크입니다. 둘 간에는 몇 가지 차이점이 있습니다. Spring은 스프링 프레임워크의 핵심 모듈을 모아서 만든 프레임워크입니다. Spring에서는 개발자가 직접 설정 파일을 작성하여 스프링 컨테이너를 구성하고, 필요한 빈 객체를 등록하고, 빈 객체 간의 의존성을 설정해야 합니다. Spring은 특정한 구성을 위해 추가적인 라이브러리와 설정이 필요합니다. 반면, Spring Boot는 스프링 프레임워크를 보다 쉽게 사용할 수 있도록 만든 프레임워크입니다. Spring Boot에서는 개발자가 설정 파일을 작성할 필요 없이, 프로젝트의 설정과 라이브러리 의존성을 자동으로 처리해주는 기능을 제공합니다. 또한, Spri..