springboot的组装特性(依赖默认组装,有依赖就有组装)

来源:互联网 发布:照片打马赛克软件 编辑:程序博客网 时间:2024/05/16 11:06

 

springboot的组装特性(依赖默认组装,有依赖就有组装)

 

1,application在母包

2,依赖文件不能乱放,springboot会根据依赖默认配置好集成好,有配置文件的细化就会结合配置文件(依赖即有配置)

 

 

 

比如依赖了cas即使没有配置也会默认集成,这样会导致访问跳出需要输入密码

 

Whitelabel Error Page

 

This application has no explicit mapping for /error, so you are seeing this as a fallback.

 

Fri Apr 14 11:22:46 CST 2017

There was an unexpected error (type=Unauthorized, status=401).

Full authentication is required to access this resource

 

 

解决方法:

 

要么去了cas依赖

要么配置好cas

要集成什么模块就用代码的方式集成,代替配置文件,所以一般有集成配置类,支持的覆写的bean类

0 0