Created
August 4, 2016 18:24
-
-
Save cristopher-rodrigues/8ebe41f8becf9cc450e5c0e1f52eb461 to your computer and use it in GitHub Desktop.
Spring boot app context
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// AppContext | |
@Configuration | |
@EnableAutoConfiguration | |
@ComponentScan(basePackages={"ebanx?"}) | |
public class AppContext { | |
} | |
// Application | |
@SpringBootApplication | |
public class Application { | |
public static void main(String[] args){ | |
SpringApplication.run(AppContext.class, args); | |
} | |
} | |
// AbstractTest | |
@RunWith(SpringJUnit4ClassRunner.class) | |
@SpringApplicationConfiguration(classes=AppContextTest.class) | |
public abstract class AbstractTest { | |
} | |
// AppContextTest | |
@Configuration | |
@Import(value={AppContext.class}) | |
@ComponentScan(basePackages={"ebanx?"}) | |
public class AppContextTest { | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment