Bug 1
报错:
Consider defining a bean of type ‘com.example.demo.service.UserService’ in your configuration.
原因:(每个人的原因都不一样)
注解 @Service 应该加在 UserServiceImpl 上而不是 UserService 上(这个bug也就改了大半天吧)
Bug 2
报错:
When allowCredentials is true, allowedOrigins cannot contain the special value “*” since that cannot be set on the “Access-Control-Allow-Origin” response header. To allow credentials to a set of origins, list them explicitly or consider using “allowedOriginPatterns” instead.
问题:跨域出现了问题,由于版本或者其他原因,allowedOrigins 使用不了了,必须换成allowedOriginPatterns。
解决: