很简单这个问题就是版本不匹配 就是2.6.0以上版本的springbootmvc扫描方法和老版本不同 在springboot配置 application.yml 里面加上如果是properties则是加上
spring.mvc.pathmatch.matching-strategy=ant_path_matcher
spring: mvc: pathmatch: matching-strategy: ant_path_matcher