File tree Expand file tree Collapse file tree 2 files changed +2
-12
lines changed
main/java/info/xiaomo/server/dataConfig
test/java/info/xiaomo/server/test Expand file tree Collapse file tree 2 files changed +2
-12
lines changed Original file line number Diff line number Diff line change @@ -23,6 +23,7 @@ public class ConfigDataManager implements IConfigDataManager {
2323 private ExcelConfigDataManager manager = new ExcelConfigDataManager ();
2424
2525 private static ConfigDataManager ourInstance = new ConfigDataManager ();
26+
2627 public static ConfigDataManager getInstance () {
2728 return ourInstance ;
2829 }
@@ -56,15 +57,6 @@ public void init(String configPath) throws Exception {
5657 init ();
5758 }
5859
59-
60- public void setResourceRoot (String resourceRoot ) {
61- manager .setExcelFileDir (resourceRoot );
62- }
63-
64- public void setConfigPackagePath (String packagePath ){
65- manager .setConfigPackageName (packagePath );
66- }
67-
6860 public void setSubfix (String subfix ) {
6961 manager .setExcelFileSuffix (subfix );
7062 }
Original file line number Diff line number Diff line change 2222public class TestExcelConfig {
2323
2424 public static void main (String [] args ) throws Exception {
25- ConfigDataManager .getInstance ().setConfigPackagePath ("info.xiaomo.server.config.beans" );
26- ConfigDataManager .getInstance ().setResourceRoot (TestExcelConfig .class .getClassLoader ().getResource ("" ).getPath ());
27- ConfigDataManager .getInstance ().init ();
25+ ConfigDataManager .getInstance ().init (TestExcelConfig .class .getClassLoader ().getResource ("" ).getPath ());
2826 ConfigDataManager .getInstance ().getConfigs (ItemConfig .class ).forEach (System .out ::println );
2927 }
3028
You can’t perform that action at this time.
0 commit comments