Skip to content

Commit

Permalink
Update 10 策略模式.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Q10Viking committed Mar 28, 2024
1 parent dfaeb73 commit 249fa1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion docs/designpattern/10 策略模式.md
Original file line number Diff line number Diff line change
Expand Up @@ -681,4 +681,5 @@ public class ScenarioTest2 {

#### 扩展总结

在springboot中我们可以根据type类型从ApplicationContext中取出具体的策略类来执行。
可以在SpringBoot中将所有的具体策略模式都注入到容器中,然后根据类型名字(Bean的名字),从容器中获取出来。简化上面xml的配置

0 comments on commit 249fa1f

Please sign in to comment.