일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
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 |
- spring
- Exception
- AOP
- springdatajpa
- pointcut
- transaction
- kotlin
- db
- http
- 자바
- QueryDSL
- 알고리즘
- jpa
- java
- 스프링 핵심 기능
- Servlet
- JDBC
- Proxy
- 스프링
- Spring Boot
- 그리디
- 인프런
- SpringBoot
- Thymeleaf
- 김영한
- 스프링 핵심 원리
- Android
- Greedy
- JPQL
- 백준
- Today
- Total
목록국제화 (3)
개발자되기 프로젝트
영어 메시지를 추가해보자! 1. 영어 메시지 추가 messages_en.properties label.item=Item label.item.id=Item ID label.item.itemName=Item Name label.item.price=price label.item.quantity=quantity page.items=Item List page.item=Item Detail page.addItem=Item Add page.updateItem=Item Update button.save=Save button.cancel=Cancel 끝 이미 HTML에 message사용하도록 설정해둠, 브라우저의 언어를 영어로 변경해보자. 언어설정을 변경하면 Request Headers의 Accept-Language가 ..
1. MessageSource Interface public interface MessageSource { String getMessage(String code, @Nullable Object[] args, @Nullable String defaultMessage, Locale locale); String getMessage(String code, @Nullable Object[] args, Locale locale) throws NoSuchMessageException; } code와 일부 파라미터로 메세지를 읽어올 수 있는 기능을 제공 2. 예시-기본 앞서 messages.properties에 아래와 같이 등록했다. 여기서 hello는 code, 안녕은 message 이다. hello=안녕 hello..
1. 메시지 기능. 화면에 보이는 문구가 마음에 들지 않는다고, 상품명이라는 단어를 모두 상품이름으로 고쳐달라고 하면 어떻게 해야할까? 여러 화면에 보이는 상품명, 가격, 수량 등, label 에 있는 단어를 변경하려면 관련있는 모든 화면들을 다 찾아가면서 변경해야 한다. addForm.html , editForm.html , item.html , items.html 귀찮다.. 이렇게 다 바꿔야 하는 이유가 뭘까? 바로 HTML 파일에 메시지가 하드코등 되어있기 때문. 메시지를 한 곳에서 관리하는 기능이 메시지 기능임. 예를들어 message.properties 와 같은 관링용 파일 생성. item=상품 item.id=상품 ID item.itemName=상품명 item.price=가격 item.quant..