본문 바로가기

JAVA

(21)
SpringBoot 2.6 이상 springfox-swagger3.0 적용 시 에러 해결 최신버전으로 https://start.spring.io/ 에서 SpringBoot 프로젝트를 생성했다. 해당 옵션으로만 DB는 선택안하고 생성해 봤다. Swagger2.0을 추가했는데 아래와 같은 에러가 발생했다. Cannot invoke "org.springframework.web.servlet.mvc.condition.PatternsRequestCondition.getPatterns()" because "this.condition" is null 원인은 SpringBoot 2.6 이상에서 springfox-swagger3.0를 추가할때 에러가 발생한 것이다. 해결은 SpringBoot 2.5 이하로 낮춘다. 또는 application.properties에서 spring.mvc.pathmatch.mat..
Spring Model Property Exception List 에러내용이 256 out of index bound? 인가 났던거 같다 json object를 post로 서버로 보냈는데 Model Binder가 List를 256까지 밖에 못받아 들였다 구글링 해보니 아래와 같이 셋팅을 해줘야한다더라 힘들다.... 해당 Contoller에 @InitBinder public void initBinder(WebDataBinder binder) { binder.setAutoGrowCollectionLimit(Integer.MAX_VALUE); }
java.io.IOException: Broken pipe 발생 원인 해당 원인은 http request가 연결을 유지하고 있지 않아서 발생하는 에러입니다. 클라이언트(브라우저 등등)에서 요청을 보내고 서버에서 프로세싱중에 브라우저를 닫는경우 서버는 처리된 데이터를 소켓에 보내려 하는데 보낼 소켓이 Close된 상황이라 에러가 발생한다.
Query DSL select count(distinct field) 처리하기 Projections.fields(해당클래스.class, 해당객체.해당필드.countDistinct().as("count")
String 에 뒷자리 "0"인거 다 삭제하기 trim end StringUtils.stripEnd("32.03100","0");
thymeleaf에 현재 1900년도 부터 현재 년도까지 표시하기 th:value="${i}" th:text="${i}">
Excel 대신 CSV excel spend a lot of cost to exprot excel but csv so i choosed the csv format korean language broken => solution response.setContentType("application/ms-excel; charset=MS949");
Query DSL Order by case when 넣는 방법 DateTimeExpression casex = new CaseBuilder().when(copOpen.coPApproStatCd.eq("HOTC226003")).then(copOpen.createDttm) .otherwise(copOpen.coPOpenDttm); //ORDER BY query.orderBy(copOpen.coPApproStatCd.desc()).orderBy(casex.desc());