¶Ô±ÈÐÂÎļþ |
| | |
| | | package com.ruoyi.demo.controller; |
| | | |
| | | import com.ruoyi.common.core.domain.AjaxResult; |
| | | import com.ruoyi.common.utils.MessageUtils; |
| | | import org.springframework.web.bind.annotation.GetMapping; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | |
| | | |
| | | /** |
| | | * æµè¯å½é
å |
| | | * |
| | | * @author Lion Li |
| | | */ |
| | | @RestController |
| | | @RequestMapping("/demo/i18n") |
| | | public class TestI18nController { |
| | | |
| | | /** |
| | | * éè¿codeè·åå½é
åå
容 |
| | | * code为 messages.properties ä¸ç key |
| | | * |
| | | * æµè¯ä½¿ç¨ user.register.success |
| | | */ |
| | | @GetMapping() |
| | | public AjaxResult<Void> get(String code) { |
| | | return AjaxResult.success(MessageUtils.message(code)); |
| | | } |
| | | } |