简体   繁体   中英

Spring boot with DB Connection to a Non database project

I have a project with Spring boot 1.4.1 which connects to an Oracle database, i want to generate another project with no connection to database, I removed the pom dependencies and changed the Starter code

TO:

@Configuration
@EnableAutoConfiguration
@ComponentScan
public class App {
/**
 * Init method
 * @param args
 */
public static void main( String[] args ){
    SpringApplication.run(App.class, args);
   }
}

FROM :

@SpringBootApplication
public class App {
/**
 * Init method
 * @param args
 */
public static void main( String[] args ){
    SpringApplication.run(App.class, args);
   }
}

the project still keep trying to configure database.

How can i leave the project just as a simple RestController Project with no database.

Thanks.

It was a problem of my configuration. I had included a connection in a library. After recompiling the library it worked!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM