일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- QueryDSL
- grafana
- spring cloud
- spring boot redis
- jmeter
- mybatis
- docker-compose
- Hibernate
- Redis Sentinel
- Docker Compose
- redis
- Selenium
- coalesce
- KAFKA
- netflix oss
- argo cd
- cassandra
- Airflow
- ChannelPipeline
- docker
- docker compose mysql
- Spring Open Feign
- JPA
- weblogic 10
- MySQL
- RabbitMQ
- WebLogic
- spring boot
- vue.js
- Netty
- Today
- Total
목록2017/05/31 (2)
IT.FARMER
RedirectAttributes 를 이용하면 redirect 시 parameter를 url?parameter1=data 의 형태를 대체 할수있다. 코드도 간결해보이고 가독성또한 좋아 보인다. 이대 parameter를 숨기고자 하는 경우가 있는데 그때 사용 할 수 있는것이 redirectAttributes.addFlashAttribute(attributeValue) 이다. 문자 그대로 Flash 이며 한번 호출후 메모리에서 삭제 된다. 새로 고침을 누르면 값은 사라짐으로, 재사용할수 없는 것이다. redirectAttributes.addFlashAttribute("reservationMngNo", reservationHistory.getReservationMngNo()); return "redirect:..
가끔 전체 적인 parameter를 redirect 파라미터로 보내고 싶은경우가 있다. 이런경우엔 코드가 잘못됬다고 볼수도 있지만. 급한? 처리를 해야할때... RedirectAttributes에 모두 담아 보내버리자. Map attributes = new HashMap(); Enumeration params = request.getParameterNames(); while (params.hasMoreElements()){ String name = (String)params.nextElement(); attributes.put(name, request.getParameter(name)); } redirectAttributes.addAllAttributes(attributes); redirectAttrib..