原因
是賬號沒有登錄進行訪問接口出現的接口權限問題
解決
修改權限
消除訪問此資源需要完全的身份驗證
修改 SecurityConfiguration 文件
.antMatchers("/api/**").authenticated()
.antMatchers("/management/health").permitAll()
1.第一個是接口
api/** 是全部接口的意思
2.第二個是授權
permitAll 允許全部訪問
是賬號沒有登錄進行訪問接口出現的接口權限問題
修改權限
消除訪問此資源需要完全的身份驗證
修改 SecurityConfiguration 文件
.antMatchers("/api/**").authenticated()
.antMatchers("/management/health").permitAll()
1.第一個是接口
api/** 是全部接口的意思
2.第二個是授權
permitAll 允許全部訪問