Web/spring 113

[Spring framework Web MVC docs] 1.3.5 DataBinder ~ 1.3.6 Exception

공부할때마다 느끼지만..... 영어를.....잘했다면.... 번역기 안돌리고... 이게 맞게 해석한건가... 걱정하면서...공부를...안할텐데.......... ......또르르...... 아무튼... 오늘 목표는 1.3.7 까지 틀린 해석이 있다면 알려주세요 1.3.5 DataBinder @Controller or @ControllerAdvice 는 WebDataBinder 의 인스턴스를 초기화하는 @InitBinder 를 사용할 수 있다. Bind request parameters (that is, form or query data) to a model object. Convert String-based request values (such as request parameters, path varia..

Web/spring 2023.02.02

[Spring framework Web MVC docs] 1.3.3 Handler Methods

틀린 해석이 있다면 알려주세요 https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc-ann-methods Web on Servlet Stack Spring Web MVC is the original web framework built on the Servlet API and has been included in the Spring Framework from the very beginning. The formal name, "Spring Web MVC," comes from the name of its source module (spring-webmvc), but it is more commonl docs.sprin..

Web/spring 2023.02.01

[Spring framework Web MVC docs] 1.3.2 Request Mapping

틀린 해석이 있다면 알려주세요 spring document 공식문서 보고 공부하는 중 https://docs.spring.io/spring-framework/docs/current/reference/html/web.html#mvc-ann-requestmapping @Controller @RestController 기본 클래스를 확장하거나 특정 인터페이스 구현 필요 X @RestController 는 메타 주석이 추가되어 렌더링할 수 있도록 함 -> @Controller, @ResponseBody 등 1.3.2. Request Mapping @RequestMapping 주석을 이용하여 컨트롤러 매핑 가능 @RestController @RequestMapping("/persons") class PersonC..

Web/spring 2023.02.01

[Spring error] error print properties

# error print custom server.error.include-binding-errors=always #에러 발생 시 Spring 기본 에러 페이지 노출 여부 server.error.include-exception=true # Response 에 Exception 을 표시할지 server.error.include-message=always # Response 에 Exception Message 를 표시할지 (never | always | on_param) server.error.include-stacktrace=always # Response 에 Stack Trace 를 표시할지 (never | always | on_param) on_trace_params 은 deprecated

Web/spring 2023.01.25

[Spring war Tomcat]

프로젝트 만들 때 배포방식을 war 로 설정 1. build.gradle 설정 plugins { id 'java' id 'war' // war 배포 id 'org.springframework.boot' version '2.7.7' id 'io.spring.dependency-management' version '1.0.15.RELEASE' } bootWar { archiveBaseName= '내가 설정' // war package name archiveFileName = '내가 설정.war' // war package file name archiveVersion = "0.0.0" } // dependencies 에서 내장톰캣 사용 주석처리하기 // providedRuntime 'org.springfram..

Web/spring 2023.01.04

[Spring Error] Servlet.service() for servlet

Servlet.service() for servlet [dispatcherServlet] in context with path [] threw exception [Request processing failed; nested exception is java.lang.NullPointerException] with root cause 구글링해보니 이 오류가 나타나는 이유 몇가지가 있었다 1. 쿼리값 주입 여부 체크 2. DB run 체크 3. 인스턴스 변수(필드 변수) 의존성 주입 읽어보고 코드를 보니 하.............. 하ㅏ하 ㅜ 정말 간단한 휴먼 오류였다ㅜㅠ private Service -> private final Service 로 바꾸니 바로 해결 아무래도.. 아직 final 에 대한 정확한..

Web/spring 2022.12.28

[Spring Entity] Entity 컬럼 안에 리스트 넣는 방법 두가지

@Entity 에 리스트 값이 들어가야할 일은 굉장히 많다 예를 들면 중복으로 체크된 값을 한몫에 넣는다던가.. 선택지가 여러개라 복수로 값이 담길 때. 이 방법 저 방법 검색해봤는데, @Convert 를 이용하는 방법과 @ElementCollection 을 사용하는 방법이 있다. 1. @Convert @Convert public class StringListConverter implements AttributeConverter { private static final String SPLIT = ","; @Override public String convertToDatabaseColumn(List stringList) { return String.join(SPLIT, stringList); } @Over..

Web/spring 2022.12.21

[Spring Security] WebSecurityConfigurerAdapter deprtecate

Spring Security 를 공부하던 중, 예제를 보고 따라하다가 예제에서 사용하는 WebSecurityConfigurerAdapter 가 deprecate 되어있다는 것을 확인했다. 🤨 방법이 새롭게 있겠지.. 검색검색 https://docs.spring.io/spring-security/reference/servlet/oauth2/login/advanced.html Advanced Configuration :: Spring Security By default, the OAuth 2.0 Login Page is auto-generated by the DefaultLoginPageGeneratingFilter. The default login page shows each configured OAuth..

Web/spring 2022.12.14
728x90