Web 242

[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

[Thymeleaf docs] 4.4 Link URLs

틀린 해석이 있다면 알려주세요 공식문서를 제일 1순위로 공부해야겠다고 짚어주셨던 부분 중 하나가 바로 이것이다 타임리프 href 사용 할때 혹시 th:href="@{|http://localhost:8080/test/order/details(orderId=${o.id})|}" 이렇게 사용해본 적 있는 사람?? 뭐가 잘못된건데 라고 한다면 바로 이 "|" 이걸 사용한 것이다 공식문서에 따르면 th:href 를 사용할 때 이런 방식을 사용하라고 알려주고 있다 view view view 나만 그렇다고 할 수 없는게 나도 블로그 포스팅 복붙하다가 쓰게된 방법이기 때문이다. | |

Web/front 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 JPA] Update Query 작성 시 @Modifying @Transactional

JPA를 사용하면서 엔티티에서 @Setter 어노테이션을 모두 제거하게 되었다 엔티티 사용시에 setter 사용을 지양하도록 하라는 설명들을 보면서 왜 그런지에 대해서 많은 공부를 하게 된 것 같다. 그러면 데이터에 수정이 있어야할 경우에는 어떻게 해야할까? 전체를 다 들고와서 계속 올리는 건 너무 쓸데없는 코드가 되지 않을까 한참 고민을 하다가 내가 작업하고 있는 것은 수 많은 컬럼 중에 하나의 boolean 상태만 바꾸는 것이라 @Query 를 사용해보기로 했다. 그런데 바로 DML 오류ㅎ... not supported for dml operations update 왜 INSERT, UPDATE, DELETE 문을 쿼리로 짰을 때 @Modifying @Transactional을 붙이라고 하는 걸까??..

Web/DB 2023.01.11

[Mac Git] 내가 보려고 정리한 명령어들

인텔리제이에 있는 깃 쓰다가 이상하게 터미널로 하는게 편해서 정리 git init // git 초기화 (원하는 경로에서 실행) git remote add origin [git repository url] // repository url 연결 git remote -v // 연결 확인 git status // tracking 상태 체크 git add . // 디렉토리 전체 트래킹 git commit -m "commit message" // 커밋시키면 이제 status 에서 커밋할게 없다고 뜰거임 git log // 커밋사항 추적 git branch -M main // Master -> main 으로 변경 git push -u origin main // git 으로 push branch 해보기 git bran..

Web/tip 2023.01.07

[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
728x90