当前位置:网站首页>9.2.5 environmentslelement method (XML configuration builder analysis) - SSM in depth analysis and project practice

9.2.5 environmentslelement method (XML configuration builder analysis) - SSM in depth analysis and project practice

2020-11-06 01:13:47 Memory

All the source code in the project can be found in the linked repository :https://github.com/chenhaoxiang/uifuture-ssm

9.2.5 environmentsElement Method

stay environmentsElement In the method , Read and parse environments Elements (environments It contains configuration information about database connection data , The connection environment of multiple databases can be configured , convenient sql Statement can be applied to multiple database environments . This is due to the possibility of different databases , Actually SQL The sentence will be a little different ), And set it to Configuration In the example .

Next, look at the source code , Such as code list 9-7 Shown .

Code list 9-7:environmentsElement Method source code

private void environmentsElement(XNode context) throws Exception 

版权声明
本文为[Memory]所创,转载请带上原文链接,感谢