■ spring controller에서 get, post 동시 접속을 허용하기 위해서 @RequestMapping부분 설정
method = {RequestMethod.POST,RequestMethod.GET}
■ 샘플 코드
@Controller @RequestMapping("simplexml") public class SimpleXMLController { @RequestMapping( value = "content.do", method = {RequestMethod.POST,RequestMethod.GET}, produces="application/xml;charset=utf-8") @ResponseBody public String listSample(HttpServletRequest request) throws Exception { return "xx"; } }
■ 톰캣서버가 시작할때 로그. POST, GET방식을 동시지원함을 알 수 있다.
정보: Mapped “{[/simplexml/content.do],methods=[POST || GET],produces=[application/xml;charset=utf-8]}” onto…
- SpringBoot Port 변경 2022년 12월 27일
- Spring 트랜잭션 관리 2019년 6월 20일
- Spring RESTful 웹 서비스 사용하기 2019년 6월 19일
- Spring RESTful 웹 서비스 2019년 6월 19일
- Spring Scheduling Task 예제 2019년 6월 18일
- spring mybatis mysql 연결 예제 2018년 5월 4일
- Spring Path Parameter 예제 2018년 2월 13일
- AngularJS $http, spring TEXT response 예제 2018년 1월 17일
- jdom2를 이용한 spring xml response(응답) 2017년 12월 5일
- jquery xml 요청, spring xml 리턴 2017년 12월 5일
- spring controller에서 get, post 동시 허용 방법 2017년 12월 5일
- mybatis, oracle procedure(오라클 커서)를 통한 데이터 조회 2017년 11월 6일
- HTTP 406 Not Acceptable in Spring, Jackson, Json 2017년 11월 6일
- ServletContextLister를 구현한 웹 애플리케이션 시작 시 작업 2016년 5월 2일
- Web Application MessageResource 2016년 3월 8일
- org.mariadb.jdbc.internal.common.QueryException : No database selected 2016년 2월 19일
- jquery spring – checkbox로 선택된 배열 주고 받기 2015년 8월 15일
- jquery spring ajax call 2015년 8월 15일
- spring json return 2015년 8월 15일
- spring exception – SimpleMappingExceptionResolver 2015년 8월 8일