"스프링 쿼리스트링 얻기 getQueryString()"의 두 판 사이의 차이

13번째 줄: 13번째 줄:
}
}
</source>
</source>
* http://localhost/?greet=hello 를 호출하면...
* http://localhost/?title=Main_page&action=raw 를 호출하면...
:웹브라우저에는 Hello, World! 가 출력되고,
:웹브라우저에는 Hello, World! 가 출력되고,
:콘솔에는 greet=hello 가 출력됨
:콘솔에는 title=Main_page&action=raw 가 출력됨


==같이 보기==
==같이 보기==

2017년 4월 12일 (수) 17:43 판

1 개요

스프링 쿼리스트링 얻기
@RestController
public class MainController {
	@RequestMapping(value = "/")
	public String main(HttpServletRequest request) {
		String query_string = request.getQueryString(); 
		System.out.println( query_string );
		return "Hello, World!";
	}
}
웹브라우저에는 Hello, World! 가 출력되고,
콘솔에는 title=Main_page&action=raw 가 출력됨

2 같이 보기

3 참고 자료

문서 댓글 ({{ doc_comments.length }})
{{ comment.name }} {{ comment.created | snstime }}