반응형

javaerror 3

[자바, 스프링부트] Unrecognized field ,not marked as ignorable

Json 을 Dto(객체)로 매핑할 때 Dto에 명시되지 않은 변수(속성)이 전달받은 Json 데이터에 들어있으면 발생 방법은 여러가지가 있으나 대표적 3가지가 있습니다. 1. ObjectMapper 를 설정하여 사용. Bean으로 등록하여 사용할 수도 있습니다. @Configuration public class ObjectMapperConfig { @Bean public ObjectMapper objectMapper(){ ObjectMapper mapper = new ObjectMapper(); mapper.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES,false); return mapper; } } 2. @JsonIgnorePropertie..

org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression

MyBatis Dynamic(동적) SQL 에러 org.apache.ibatis.ognl.ExpressionSyntaxException: Malformed OGNL expression 스프링으로 코딩중 XML 매퍼에서 MyBatis Dynamic(동적) SQL 작성시 잘못된 구문이나, 오류가 있을 때 발생하였습니다. ... ... 위와 같은 코드가 있다면, 실행시 아래와 같은 에러가 납니다. org.springframework.web.util.NestedServletException: Request processing failed; nested exception is org.mybatis.spring.MyBatisSystemException: nested exception is org.apache.iba..

[EerrorLog] Required String parameter parameter is not present

Required String parameter 'parameter' is not present Ajax로 Json에 담아 컨트롤러에 파라미터 값을 보냈고, 컨트롤러의 @RequestParam으로 해당 파라미터 값을 받았을 때, 전달받은 파라미터 값이 없거나 타입이 다를 경우 발생하였습니다 @RequestMapping(path = "getMemberInfo") @ResponseBody public String getMemberInfo( @RequestParam String memberId ) { .... .... .... return memberInfo; } 위의 경우 @RequestParam을 선언하고, required = false 또는 defaultValue를 사용하지 않았기 때문에, Ajax로 파라..

반응형