1. 程式人生 > >spring boot + activiti-rest 做介面服務遮蔽authentication

spring boot + activiti-rest 做介面服務遮蔽authentication

 1、maven 依賴引入

            <dependency>
<groupId>org.activiti</groupId>
<artifactId>activiti-spring-boot-starter-basic</artifactId>
<version>5.21.0</version>
    </dependency>
   <dependency>
   <groupId>org.activiti</groupId>

   <artifactId>activiti-spring-boot-starter-rest-api</artifactId>
   <version>5.21.0</version>
    </dependency>


2、由於做個單獨服務,activiti-rest會預設進行basic authentication,那麼就需要遮蔽驗證。

 在boot服務啟動類裡面加上這個,boot啟動的時候就會螢幕,rest-client請求的時候就不會驗證了

@EnableAutoConfiguration(exclude = {
        org.springframework.boot.autoconfigure.security.SecurityAutoConfiguration.class,
        org.activiti.spring.boot.SecurityAutoConfiguration.class,
        org.springframework.boot.actuate.autoconfigure.ManagementWebSecurityAutoConfiguration.class
})