Solon I18n:三种解析器,零样板代码
如果你在 Spring Boot 里做过国际化,流程大概是这样的:配 MessageSource 的 Bean、写 ReloadableResourceBundleMessageSource、声明 LocaleResolver、注册 LocaleChangeInterceptor…五六步之后才能看到第一行翻译文本。 Solon 换了个方式。整个 i18n 模块围绕三个解析器、一个注解、一个工具类展开——没有 XML、没有拦截器注册、没有样板配置。 资源文件的约定 把文件放到 resources/i18n/ 下: resources/i18n/message...
