JAVA-8373: Split or move spring-boot-bootstrap module
This commit is contained in:
@@ -5,4 +5,5 @@ This module contains articles about Spring Boot annotations
|
||||
### Relevant Articles:
|
||||
|
||||
- [Spring Conditional Annotations](https://www.baeldung.com/spring-conditional-annotations)
|
||||
- [Guide to @SpringBootConfiguration in Spring Boot](https://www.baeldung.com/springbootconfiguration-annotation)
|
||||
- More articles: [[<-- prev]](/spring-boot-modules/spring-boot-annotations)
|
||||
|
||||
@@ -0,0 +1,20 @@
|
||||
package com.baeldung.springbootconfiguration;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.SpringBootConfiguration;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
||||
@ComponentScan(basePackages = {"com.baeldung.springbootconfiguration.*"})
|
||||
@SpringBootConfiguration
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
|
||||
@Bean
|
||||
public PersonService personService() {
|
||||
return new PersonServiceImpl();
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.baeldung.springbootconfiguration;
|
||||
|
||||
public interface PersonService {
|
||||
}
|
||||
@@ -0,0 +1,4 @@
|
||||
package com.baeldung.springbootconfiguration;
|
||||
|
||||
public class PersonServiceImpl implements PersonService {
|
||||
}
|
||||
@@ -0,0 +1 @@
|
||||
spring.main.web-application-type=none
|
||||
@@ -0,0 +1,15 @@
|
||||
package com.baeldung.springbootconfiguration;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
||||
import org.springframework.test.context.junit4.SpringRunner;
|
||||
|
||||
@RunWith(SpringRunner.class)
|
||||
@SpringBootTest
|
||||
public class SpringContextTest {
|
||||
|
||||
@Test
|
||||
public void contextLoads() {
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user