일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | 5 | ||
6 | 7 | 8 | 9 | 10 | 11 | 12 |
13 | 14 | 15 | 16 | 17 | 18 | 19 |
20 | 21 | 22 | 23 | 24 | 25 | 26 |
27 | 28 | 29 | 30 | 31 |
- react-three-fiber
- 코드 가시화
- CSS
- 타입 오류
- 자바
- spring
- 1인개발
- 깃허브
- MySQL
- 렌파이
- 코드 시각화
- 웹 퍼블리싱
- SQL
- 값 가져오기
- 문서객체모델
- 전처리도구
- REACT
- 로그인 기능
- jsp
- 헬생아
- 코드 이해하기
- 쿼리 오류
- jstl
- 그딴건없었다
- C언어
- SpringBoot
- 자바스크립트
- nvl함수
- Python
- java
- Today
- Total
This is it. it's IT.
Name for argument type [java.lang.String] not available, and parameter name information not found in class file either. 본문
Name for argument type [java.lang.String] not available, and parameter name information not found in class file either.
응애개발자 애기 2021. 11. 15. 14:59https://m.blog.naver.com/sm_woo/70185755273
spring / Spring @MVC을 쓸 때, java compile option에 따라서 오류가 날수도 있다?
문제 상황)Spring @MVC를 사용하고, 아래와 같이 name 요청 파라미터를 받아 처리하는 간단한콘트롤러 ...
blog.naver.com
파라미터를 제대로 인식하지 못해서 생기는 오류라고 한다.
pom.xml 설정을 바꾸면
@RequestParam()을 생략하면서 코딩할 수 있다.
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>2.5.1</version>
<configuration>
<source>1.8</source>
<target>1.8</target>
<debug>true</debug>
<compilerArgument>-Xlint:all</compilerArgument>
<showWarnings>true</showWarnings>
<showDeprecation>true</showDeprecation>
</configuration>
</plugin>
Request processing failed; nested exception is java.lang.IllegalArgumentException: Name for argument type [java.lang.String] not available, and parameter name information not found in class file either.
아 익진짜 오늘 개고생햇음
/*model.addAttribute("c_detail",service.c_detail(p_name,email));*/
이렇게하면 타입 오류 나는 이유 : 첨에 매퍼에서 리절트타입 VO로 줬으니까 매개변수도 List<VO>에 담아서 같이 보내줘야한다는것이;;;;ㅇ
List<ProductVO> test = service.c_detail(p_name,email);
model.addAttribute("c_detail",test);
이런식으로 해야 맞는거임;;