mirror of
https://github.com/continew-org/continew-starter.git
synced 2025-11-06 16:57:12 +08:00
fix(web): 修复开启 i18n 后访问接口报错的问题
This commit is contained in:
@@ -21,14 +21,13 @@ import org.apache.commons.lang3.reflect.TypeUtils;
|
||||
import org.springdoc.core.parsers.ReturnTypeParser;
|
||||
import org.springframework.core.MethodParameter;
|
||||
import top.continew.starter.apidoc.util.DocUtils;
|
||||
import top.continew.starter.web.model.R;
|
||||
|
||||
import java.lang.reflect.Type;
|
||||
|
||||
/**
|
||||
* SpringDoc 全局响应处理器
|
||||
* <p>
|
||||
* 接口文档全局添加响应格式 {@link R}
|
||||
* 接口文档全局添加响应格式 {@link com.feiniaojin.gracefulresponse.data.Response}
|
||||
* </p>
|
||||
*
|
||||
* @author echo
|
||||
|
||||
@@ -183,7 +183,7 @@ public class GlobalResponseAutoConfiguration {
|
||||
@ConditionalOnProperty(prefix = PropertiesConstants.WEB_RESPONSE, name = "i18n", havingValue = "true")
|
||||
public MessageSource messageSource() {
|
||||
ResourceBundleMessageSource messageSource = new ResourceBundleMessageSource();
|
||||
messageSource.setBasenames("i18n", "i18n/empty-messages");
|
||||
messageSource.setBasenames("i18n", "i18n/messages");
|
||||
messageSource.setDefaultEncoding("UTF-8");
|
||||
messageSource.setDefaultLocale(Locale.CHINA);
|
||||
return messageSource;
|
||||
|
||||
Reference in New Issue
Block a user