#在controller中定义接口并使用spring注解方式 @autowired for assembly work
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M02/8A/CB/wKiom1g7_-WAkaP5AABpJ7nwIsk246.jpg-wh_500x0-wm_3 -wmp_4-s_1759237548.jpg "style=" Float:none; "title=" 1.jpg "alt=" Wkiom1g7_-wakap5aabpj7nwisk246.jpg-wh_50 "/>
#对不同的service进行get和set, and use @qualifier to label the service name in the set method.
Note that the service name marked here must be consistent with the Bean's ID in spring's corresponding XML!
650) this.width=650; "Src=" Http://s1.51cto.com/wyfs02/M00/8A/CB/wKiom1g7_-WwCHudAAChwxKoyho499.jpg-wh_500x0-wm_3 -wmp_4-s_3800649732.jpg "style=" Float:none; "title=" 2.jpg "alt=" Wkiom1g7_-wwchudaachwxkoyho499.jpg-wh_50 "/>
#在对应controller中
650) this.width=650; "Src=" Http://s2.51cto.com/wyfs02/M02/8A/C7/wKioL1g7_-ayTEqiAADMJiirHPM652.jpg-wh_500x0-wm_3 -wmp_4-s_3783027372.jpg "style=" Float:none; "title=" 3.jpg "alt=" Wkiol1g7_-ayteqiaadmjiirhpm652.jpg-wh_50 "/>
#实现类2
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/C7/wKioL1g7_-fAekwqAABhM63wESw577.jpg-wh_500x0-wm_3 -wmp_4-s_3774037322.jpg "style=" Float:none; "title=" 4.jpg "alt=" Wkiol1g7_-faekwqaabhm63wesw577.jpg-wh_50 "/>
#实现类1
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/CB/wKiom1g7_-eSQhMuAABtTV__46I125.jpg-wh_500x0-wm_3 -wmp_4-s_2508386408.jpg "style=" Float:none; "title=" 5.jpg "alt=" Wkiom1g7_-esqhmuaabttv__46i125.jpg-wh_50 "/>
#spring对应xml中配置对应javabean, the name of the bean corresponding ID must be consistent with the service name in the controller!
650) this.width=650; "Src=" Http://s3.51cto.com/wyfs02/M00/8A/C7/wKioL1g7_-jS4uXrAAHfbAqQmko491.jpg-wh_500x0-wm_3 -wmp_4-s_1998717551.jpg "style=" Float:none; "title=" 6.jpg "alt=" Wkiol1g7_-js4uxraahfbaqqmko491.jpg-wh_50 "/>
This article is from the "You can choose Extraordinary" blog, please be sure to keep this source http://ylcodes01.blog.51cto.com/5607366/1877471
Springmvc different implementation classes that call the same interface with @qualifier annotations