ergehenmeng commented on issue #915: URL: https://github.com/apache/fesod/issues/915#issuecomment-5265237394
> 你好,使用枚举的前提是,这些类型的值都是提前确定好了的,如果是使用注解,也是提前硬编码到注解中,而且对于用惯了EasyExcel的@ExcelProperty的开发者有一些心理负担,虽然使用注解也可以,那这样的话,所有需要翻译的字段都需要加上这个注解(或者拓展@ExcelProperty)。最后我觉得实现起来的复杂度和需要校验的成本会比较大。 > > 使用枚举是因为业务代码中会直接使用这个枚举。业务开发者会像操作基本数据类型的包装类一样直接使用他。直接像mybatis-plus一样实现一个IEnum接口,就无需做其他配置了 [#issuecomment-5261830229](https://github.com/apache/fesod/issues/988#issuecomment-5261830229) [#198 ](https://github.com/apache/fesod/issues/198) 这里两个问题都是为了解决这个问题的讨论。我们可以在[#988 ](https://github.com/apache/fesod/issues/988) 这里进行统一讨论。 实际上只要开放注解, 你可以单独使用自定义注解, 从而忽略掉原生注解, 可以在一个注解上实现, 自定义翻译 数据库数据字典翻译 或者枚举翻译 , 甚至更多可能性, 你可以自己定义自己的枚举接口定义在这个注解内, 而且从实现的技术单独角度来说很简单, 也符合高内聚低耦合的理念 -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: [email protected] For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
