The invention discloses a
processing strategy loading execution
system and method based on a Spring framework, and relates to the technical field of
software development, and the
system comprises a component enumeration class, a strategy interface, a strategy template class, a basic factory class, the Spring framework and a component factory class. According to the method, the
dependency injection mechanism of the Spring framework is combined with the policy mode formed by the policy interface, the basic factory class, the policy template class, the component enumeration class and the component factory class, so that independent management of different policies is realized, the
coupling degree is reduced, codes do not need to be changed when the policies are newly added, and the expansibility is improved; an abstract template of the strategy is provided through the strategy template class, so that the code
maintainability is improved; by introducing a cache mechanism into the basic factory class, the strategy instance is prevented from being searched repeatedly, and the
system operation efficiency is improved.