feat(i18n): 新增多语言国际化支持

引入 II18nService 与 I18nServiceImpl,使 AppleService 及全局异常处理器可按 Accept-Language 返回本地化错误信息;ErrorCode 新增 getCodeAsString;数据库连接改为 keyborad_db。
This commit is contained in:
2025-12-01 21:54:51 +08:00
parent 683accca83
commit bcbb623ee4
9 changed files with 261 additions and 45 deletions

View File

@@ -1,7 +1,7 @@
spring:
datasource:
driver-class-name: org.postgresql.Driver
url: jdbc:postgresql://localhost:5432/postgres
url: jdbc:postgresql://localhost:5432/keyborad_db
username: root
password: 123asd

View File

@@ -13,4 +13,8 @@
<!--@mbg.generated-->
id, code, "locale", message
</sql>
<select id="selectByCodeAndLocale" resultMap="BaseResultMap">
SELECT * FROM "i18n_message" WHERE code = #{code,jdbcType=VARCHAR} AND locale = #{locale,jdbcType=VARCHAR}
</select>
</mapper>