1.pom.xmlファイルに座標を追加します
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
2.アプリケーション起動アノテーションの変更
原注解:@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class})
修改后:@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class,org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration.class})