spring boot的基本配置——关闭某个特定的自动配置

package com.test;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.data.neo4j.Neo4jDataAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;

@SpringBootApplication(exclude = {Neo4jDataAutoConfiguration.class})
@ComponentScan(basePackages = {"com.test.controller*"})
public class SpringBootStart
{
    public static void main(String[] args)
    {
        SpringApplication.run(SpringBootStart.class, args);
    }

}

  

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

posted @ 2022-05-14 14:48  小白龙白龙马  阅读(217)  评论(0编辑  收藏  举报