dataease-dm/backend/src/main/java/io/dataease/controller/HelloController.java
2021-02-20 10:23:37 +08:00

22 lines
670 B
Java

package io.dataease.controller;
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.RestController;
import javax.annotation.Resource;
@RestController
@RequestMapping("anonymous")
public class HelloController {
@Resource
MessageSource messageSource;
@GetMapping("hello")
public String hello() {
return messageSource.getMessage("max_thread_insufficient", null, "默认值", LocaleContextHolder.getLocale());
}
}