본문 바로가기

반응형

개발(합니다)/시나브로(이슈)

(88)
415 unsupported media type json spring 회원가입 유효성 검사를 하면서 Test를 위해 json형태로 파라미터를 넘겼고 실제 회원가입에서는 form형태로 전송했을 때 발생한 에러입니다. spring에서 json을 받을 때는 contextType을 application/json;charset=utf-8로 보내야 합니다. 에러 상황 MemberTest.java this.mockMvc.perform(post("/member").contentType(MediaType.APPLICATION_JSON) .content(objectMapper.writeValueAsBytes(memberVo))).andDo(print()).andExpect(status().isOk()); sjgn_form.jsp 아이디 (영문 3글자+숫자 3글자 조합) 비밀번호(6~20자리..
java.lang.NoSuchMethodError: javax.servlet.http.HttpServletResponse.getStatus() Spring TDD를 시작해보려고 가장 간단한 hello를 호출 했는데 에러가 발생했습니다. @RunWith(SpringJUnit4ClassRunner.class)@WebAppConfiguration@ContextConfiguration(locations = "file:src/main/webapp/WEB-INF/spring/**/**.xml")public class MemberTest { private static final Logger logger = LoggerFactory.getLogger(MemberTest.class); @Inject private WebApplicationContext wac; private MockMvc mockMvc; @Inject private MemberService m..
Error creating bean with name 'org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter' Instantiation of bean failed; nested exception is Spring maven HATEOAS를 정리하던 중 에러가 발생했습니다. 톰캣이 구동은 되지만 빌드하는 과정에서 에러가 발생했습니다. 라이브러리와 spring의 버전이 맞지 않아 빈을 생성하지 못한 에러입니다.라이브러리의 버전과 spring의 버전을 맞추어 주면 해결됩니다. pom.xml 변경 전 com.fasterxml.jackson.core jackson-core 2.8.5 com.fasterxml.jackson.core jackson-databind 2.8.5 pom.xml 변경 후 com.fasterxml.jackson.core jackson-core 2.9.7 com.fasterxml.jackson.core jackson-databind 2.9.7
org.springframework.http.converter.HttpMessageNotWritableException No converter found for return value of type .hateoas. Spring maven으로 HATEOAS를 정리하는 과정에서 에러가 발생했습니다. @RestController와 @ResponseBody를 사용하려면 json 형태의 라이브러리가 있어야 합니다.가장 많이 사용하는 jackson으로 문제로 해결했습니다. pom.xml com.fasterxml.jackson.core jackson-core 2.9.7 com.fasterxml.jackson.core jackson-databind 2.9.7 라이브러리를 pom.xml에 추가하므로 문제가 해결됩니다.
CGLIB is required to process @Configuration classes. Either add CGLIB to the classpath or remove the following @Configuration bean definitions: [javaConfiguration] Spring 3.x 버전에서 @Configuration을 사용하려는데 에러가 나옵니다. CGLIB is required to process @Configuration classes. Either add CGLIB to the classpath or remove the following @Configuration bean definitions: [javaConfiguration] CGLIB를 요청한다고. 그래서 POM.XML에 CGLIB를 추가했습니다. cglib cglib 2.2.2 깔끔하게 해결되었습니다.
java.lang.NoClassDefFoundError: org/springframework/core/JdkVersion 무엇이 문제인가 찾아 봤더니 역시 스택오버플로우에 있었습니다.POM.xml에서 spring-jdbc 버전을 다르게 했습니다.spring 버전이랑 spring-jdbc버전이랑 맞추면 해결 됩니다. 참고
The superclass javax.servlet.http.HttpServlet was not found on the Java Build Path 빌드 경로를 찾지 못하는 에러 해결 방법요약Preferences - Server - Add - tomcat 추가프로젝트 - java build path - Liberaries 탭 - add Liberary..Server runtime - tomcat 추가-> project facets에서 해결하는 방법도 있음 Preferences - Server -Add - tomcat 추가 java build path Add Library Server Runtime tomcat 추가 확인 에러 해결
#Class 'org.springframework.web.servlet.view.InternalResourceViewResolver' not found 개발 환경 : 이클립스프레임워크 : 스프링 스프링 셋팅을 하려고 sts 다운받고 legacy에서 mvc project를 실행했더니!spring 설정 파일을 못찾는다.... 혹시나 다운이 안된건가 확인해보니 잘 있습니다. 해결 방법Spring project nature을 비활성화 했다가 활성화 하는 방법 프로젝트 오른쪽 마우스 클릭 - spring tools - remove spring project nature -> spring tools - add spring project naturestack over의 답변에 따라 해봤는데 안된다. F5, Cleanup Project, F5, Server Clean, maybe Server Clean Working directory.spring 버전을 변경 : 가장..

반응형