需求描述:

项目中应用其他项目的jar包,然后有些controller中的方法有缺陷需要修改。

 

1.配置添加

spring.main.allow-bean-definition-overriding=true

2.添加新的controller类继承需要修改的controller类,并且重写其中需要修改的方法

3.使用@bean注解在配置类中将新的controller类注册为和原始的controller类名称一样的bean

相关文章:

  • 2022-01-31
  • 2022-12-23
  • 2022-02-19
  • 2021-06-29
  • 2021-08-26
  • 2021-11-02
  • 2021-11-30
  • 2022-02-09
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-12
  • 2022-12-23
  • 2022-01-01
  • 2022-12-23
相关资源
相似解决方案