|
@@ -0,0 +1,41 @@
|
|
|
|
+package com.txz.mall.controller;
|
|
|
|
+
|
|
|
|
+import com.github.pagehelper.PageHelper;
|
|
|
|
+import com.github.pagehelper.PageInfo;
|
|
|
|
+import com.txz.mall.core.Result;
|
|
|
|
+import com.txz.mall.core.ResultCode;
|
|
|
|
+import com.txz.mall.model.StoreCombination;
|
|
|
|
+import com.txz.mall.util.I18nUtil;
|
|
|
|
+import io.swagger.annotations.ApiOperation;
|
|
|
|
+import lombok.RequiredArgsConstructor;
|
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
+import org.springframework.context.MessageSource;
|
|
|
|
+import org.springframework.context.i18n.LocaleContextHolder;
|
|
|
|
+import org.springframework.web.bind.annotation.GetMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
+import org.springframework.web.bind.annotation.RequestParam;
|
|
|
|
+import org.springframework.web.bind.annotation.RestController;
|
|
|
|
+
|
|
|
|
+import java.util.List;
|
|
|
|
+import java.util.Locale;
|
|
|
|
+
|
|
|
|
+@RestController
|
|
|
|
+@RequiredArgsConstructor
|
|
|
|
+@RequestMapping("/test")
|
|
|
|
+public class i18nTestController {
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ @ApiOperation(value = "demo")
|
|
|
|
+ @GetMapping(value = "/demo")
|
|
|
|
+ public String getMore() {
|
|
|
|
+
|
|
|
|
+ String lala = I18nUtil.get("order.does.not.exist");
|
|
|
|
+
|
|
|
|
+ return lala;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+}
|