fix: add only one spring boot app

This commit is contained in:
luca 2023-11-13 12:24:40 +01:00
parent 47c7554352
commit 25a02eb86d
9 changed files with 9 additions and 38 deletions

View File

@ -1,11 +1,8 @@
package com.baeldung.overridebean.basic;
package com.baeldung.overridebean;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.baeldung.overridebean.Service;
import com.baeldung.overridebean.ServiceImpl;
@Configuration
public class Config {

View File

@ -1,4 +1,4 @@
package com.baeldung.overridebean.basic;
package com.baeldung.overridebean.boot;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,14 +0,0 @@
package com.baeldung.overridebean.conditional;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
@SpringBootApplication(exclude = { SecurityAutoConfiguration.class, OAuth2ResourceServerAutoConfiguration.class })
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}

View File

@ -1,14 +0,0 @@
package com.baeldung.overridebean.profile;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.oauth2.resource.servlet.OAuth2ResourceServerAutoConfiguration;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
@SpringBootApplication(exclude = { SecurityAutoConfiguration.class, OAuth2ResourceServerAutoConfiguration.class })
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class, args);
}
}

View File

@ -12,6 +12,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.web.servlet.MockMvc;
import com.baeldung.overridebean.Endpoint;
import com.baeldung.overridebean.boot.Application;
@SpringBootTest(classes = { Application.class, ConditionalConfig.class, Endpoint.class, ConditionalTestConfig.class }, properties = "service.stub=true")
@AutoConfigureMockMvc

View File

@ -15,7 +15,7 @@ import org.springframework.test.web.servlet.MockMvc;
import com.baeldung.overridebean.Endpoint;
import com.baeldung.overridebean.Service;
import com.baeldung.overridebean.basic.Application;
import com.baeldung.overridebean.boot.Application;
@SpringBootTest(classes = { Application.class, Endpoint.class })
@AutoConfigureMockMvc

View File

@ -11,9 +11,9 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.web.servlet.MockMvc;
import com.baeldung.overridebean.Config;
import com.baeldung.overridebean.Endpoint;
import com.baeldung.overridebean.basic.Application;
import com.baeldung.overridebean.basic.Config;
import com.baeldung.overridebean.boot.Application;
@SpringBootTest(classes = { Application.class, Config.class, Endpoint.class, OverrideBeanDefinitionTestConfig.class }, properties = "spring.main.allow-bean-definition-overriding=true")
@AutoConfigureMockMvc

View File

@ -11,9 +11,9 @@ import org.springframework.boot.test.autoconfigure.web.servlet.AutoConfigureMock
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.web.servlet.MockMvc;
import com.baeldung.overridebean.Config;
import com.baeldung.overridebean.Endpoint;
import com.baeldung.overridebean.basic.Application;
import com.baeldung.overridebean.basic.Config;
import com.baeldung.overridebean.boot.Application;
@SpringBootTest(classes = { Application.class, Config.class, Endpoint.class, PrimaryTestConfig.class })
@AutoConfigureMockMvc

View File

@ -12,6 +12,7 @@ import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.web.servlet.MockMvc;
import com.baeldung.overridebean.Endpoint;
import com.baeldung.overridebean.boot.Application;
@SpringBootTest(classes = { Application.class, ProfileConfig.class, Endpoint.class, ProfileTestConfig.class })
@AutoConfigureMockMvc