일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | 6 | 7 |
8 | 9 | 10 | 11 | 12 | 13 | 14 |
15 | 16 | 17 | 18 | 19 | 20 | 21 |
22 | 23 | 24 | 25 | 26 | 27 | 28 |
29 | 30 |
- #java#JAVA#프로그래밍#웹개발자
- 국비지원자바#국비교육자바#국비지원java#국비교육java#자바스크립트#프론트엔드
- 쿼리스트링#쿼리문자열#바인딩
- Java#java#자바#다오#디티오#브이오#dao#dto#vo
- IntelliJ#인텔리제이#인텔리#단축키
- 항해플러스#항해#항해플러스3기#회고
- db#데이터베이스#오라클#sql
- 국비지원JAVA
- Java#JAVA#매개변수
- html#HTML#프론트엔드#개발자#코딩#국비지원#국비교육#국비지원프론트엔드#국비지원HTML#국비지원html#국비프론트엔드
- #
- 국비지원JAVA#국비교육JAVA#국비지원자바#국비교육자바#JSP#SERVLET#서블릿#
- Java#정처기#비트연산자#정보처리기사
- tibero#티베로#이중화#failvover
- 국비지원JAVA#국비지원자바#프로그랭#JSP#국비지원JSP#국비교육JSP#웹개발자#코딩
- 자바#Java#배열예시#연습#기초다지기
- java
- 개발자#it도서#도메인#DDD#ddd
- 국비지원#국비교육
- Resource #
- Spring#spring#스프링#스프링프레임워크#스프링자동주입#스프링생성자#스프링기본#국비지원#국비교육#국비지원스프링
- 항해99 #항해플러스 #주니어개발자 #주니어개발자역량강화 #주니어개발자멘토링 #개발자사이드프로젝트 #코딩부트캠프 #코딩부트캠프후기
- 국비지원#국비교육#국비지원자바#국비교육자바#css#HTML#JAVA
- Java#java#메모리영역#클래스로더#가비지컬렉터
- spring#Spring#RequestBody#ResponseBody
- 자바
- Spring#spring#스프링#스프링프레임워크#스프링의존성주입#스프링생성자#스프링기본#국비지원#국비교육#국비지원스프링
- Java#컴파일러#자바컴파일러#
- 개발자도서#개발자책#도메인#DDD#도메인주도개발시작하기#개발스터디#
- 프로그래밍
- Today
- Total
목록스프링Spring (34)
개린이 개발노트
@RequestParam은 Spring Framework에서 웹 요청의 파라미터를 메서드의 매개변수로 바인딩하기 위해 사용되는 어노테이션입니다. 주로 웹 애플리케이션의 컨트롤러에서 사용되며, HTTP 요청의 파라미터를 컨트롤러 메서드의 매개변수로 전달받을 때 활용됩니다. @RequestParam은 다양한 속성을 제공하여 파라미터의 동작을 커스터마이징할 수 있습니다. 가장 간단한 형태는 아래와 같습니다 @GetMapping("/example") public String exampleMethod(@RequestParam String parameterName) { // 메서드 내용... return "result"; } 위의 예시에서 parameterName은 HTTP 요청의 파라미터 중에서 "paramete..
@Resource와 @Autowired는 모두 Spring Framework에서 의존성 주입을 수행하는데 사용되는 어노테이션입니다. 그러나 이 두 어노테이션 간에는 몇 가지 차이가 있습니다. 사용 목적: @Resource: 주로 자바 EE (Enterprise Edition) 환경에서 사용되며, 기본적으로 이름을 기반으로 의존성을 주입합니다. 이름 기반으로 주입되는 자원의 경우 name 속성을 사용하여 지정할 수 있습니다. @Autowired: Spring Framework에서 주로 사용되며, 주입할 빈을 타입을 기반으로 찾아서 의존성을 주입합니다. 주입 방식: @Resource: 이름(빈의 id나 이름)을 기반으로 주입합니다. 예를 들어 @Resource(name = "userService")와 같이 ..
1. @RestController란? - 스프링프레임워크 4.x 버전 이상부터 사용가능한 어노테이션으로 @Controller에 @ResponseBody가 결합된 어노테이션입니다. 컨트롤러 클래스에 @ RestController를 붙이면, 컨트롤러 클래스 하위 메서드에 @ResponseBody 어노테이션을 붙이지 않아도 문자열과 JSON 등을 전송할 수 있습니다. - @ResponseBody란? @Responsebody 어노테이션을 사용하면 http요청 body를 자바 객체로 전달받을 수 있다. - @RequestBodyf란? 클라이언트에서 서버로 필요한 데이터를 요청하기 위해 JSON 데이터를 요청 본문에 담아서 서버로 보내면, 서버에서는 @RequestBody 어노테이션을 사용하여 HTTP 요청 본문에..
HikariCP root-context.xml에 다음 코드를등록합니다. 천천히 코드를 살펴보며 각각의 기능과 의존성관계를 설명하겠습니다. HikariCP 공통 빈 등록 [ HikariConfig ] @DB정보를 주입하는 HikariCP의 라이브러리 HikariConfig입니다. HikariConfig의 각 필드에 setter()로 DB정보들을 주입합니다. hikariconfig라는 이름으로 빈 등록을 합니다. 만약 hikariconfig에서 setter()로 DB정보를 주입받지 않았다면, HikariDataSource가 어딘가로 부터 실행, 로드될때 NullPointerException이 발생하게 됩니다. [ HikariDataSource ] @ DB정보를 담아주는 DataSource 역할을 제공하는 H..
스프링 MVC 컨트롤러 (Controller) 기본적인 흐름은 client가 요청을 하면, @Controller에 진입한다. 컨트롤러는 요청에 대한 작업을 수행하고, 뷰쪽으로 데이터를 전달한다. 컨트롤러 클래스 제작 순서 @Controller를 이용해서 클래스를 생성한다. @RequestMapping을 이용해, view의 요청 경로 지정한다. 요청 처리 메소드(로직) 구현한다. 뷰 이름 리턴한다. 예를들어, @Controller // 컨트롤러 지정 public class HomeController { // 뷰의 요청 경로 지정 @RequestMapping(value = "/", method = RequestMethod.GET) public String home(Locale locale, Model mod..
https://jojelly.tistory.com/60 Spring MVC 구조 및 처리 순서 오늘부터 토이 프로젝트를 만들기위해 MVC구조를 다시한번 공부하였다. 1. Model(모델) 어플리케이션의 데이터이며, 모든 데이터 정보를 가공하여 가지고 있는 컴포넌트이다. 사용자가 이용하려는 jojelly.tistory.com
게시판 삭제 기능 구현 '게시판 수정(modify.jsp)' 페이지에서 '삭제' 버튼 추가와 버튼 기능 구현을 목표로 합니다. '삭제' 버튼을 눌렀을 때 해당 게시판 삭제가 이루어지고 '목록 페이지(list.jsp)'로 이동이 되며, 삭제가 완료되었다는 경고창을 띄울 것입니다. 순서 1. Mapper 처리 및 테스트 2. Service 처리 및 테스트 3. Controller 처리 4. View 처리 5. 테스트 1. Mapper 처리 및 테스트 쿼리문 테스트 '삭제' 기능에 사용될 쿼리문을 테스트 합니다. 삭제 기능에 사용할 쿼리문은 DELETE문입니다. WHERE 조건문에 '게시판 번호' 지정을 통하여, 특정 페이지만 삭제되도록 만듭니다. 1 2 3 delete from vam_board where ..
Spring의 전체적인 실행 순서 Request -> DispatcherServlet -> HandlerMapping -> (Controller -> Service -> DAO -> DB -> DAO -> Service -> Controller) -> DispatcherServlet -> ViewResolver -> View -> DispatcherServlet -> Response 1. 클라이언트가 Request 요청을 하면, DispatcherServlet이 요청을 가로챈다. 이때가 web.xml에. 최초의 web.xml 에서는 이 '/'와 같이 해당 애플리케이션의 모든 URL로 등록돼있기 때문에, 만약 *. do와 같이 특정 URL만 적용하고 싶다면 의 내용을 바꿔주어 범위를 변경하면 된다. 2. ..
처음 하는 스프링 https://jayviii.tistory.com/category/dev/java?page=3 'dev/java' 카테고리의 글 목록 (3 Page) jayviii.tistory.com
토비-스프링 참조 8.3 POJO 프로그래밍 스프링의 가장 강력한 특징과 목표를 기술적으로 정의하자면 아래와 같다. 분리됐지만 반드시 필요한 엔터프라이즈 서비스 기술을 POJO 방식으로 개발된 애플리케이션 핵심 로직을 담은 코드에 제공한다. 해석 (1) : 핵심 로직은 아니지만 반드시 필요한 뒷단의 기술을 (2) : POJO 방식으로 개발된 애플리케이션 핵심 로직에 포함시킨다. 핵심 로직과 뒷단의 기술을 분리하였는데 (2)에 포함시켜 제공하고자 하는게 스프링이 기술적으로 지향하는 목적이라고 한다. 그렇다면 POJO가 대체 뭘까? POJO에 대해서 알아보자. 예시를 들어봅시다. public class UserDTO { private String userName; private String userId; p..