Closed LiWenGu closed 6 years ago
@LiWenGu
读取配置文件这块内容截止 v1.0.1
版本还没有想到具体的实现。
但是我初步的设想是读取 *.properties
,而不是 yml
,yml
给我的感觉不是特别清晰,虽然现在 Spring 也支持这样的方式。
Cicada
默认是应该是读取 classpath
中的 application.properties
。如果需要自定义配置;只需要实现特定接口定义好配置文件名称即可。
同时也得支持外置文件,方便不同环境。
这块具体的实现还在考虑中,多谢本次 PR。
就代码层面还是可以沟通的,比如打日志这些。
具体请参考: vjtools
随便提下,希望大家参与时使用英文。不管是 issue、注释、PR 描述等,坚持下去肯定对大家有好处。
Thank you. I will read the VJTools carefully. My code is really not standard enough,
no bad smells in code
@LiWenGu
Expect better PR.
参考
org.springframework.beans.factory.config.YamlProcessor
,粗陋的实现,感觉如果要易扩展,还缺少两个:另外考虑到,AppConfig 是单例,获取 getInstance,就没有使用反射,直接使用的 getInstance,缺点在于如果增加了一个项配置,则需要在源码中增加一行 set 方法,优点在于不需要反射啦。 另外还有多配置文件的读取也没有实现。