Files
spring-boot-rest/spring-mvc-basics-4/src/main/java/com/baeldung/contexts/config/RootApplicationConfig.java
2019-12-16 22:25:22 +02:00

20 lines
542 B
Java

package com.baeldung.contexts.config;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import com.baeldung.contexts.Greeting;
@Configuration
@ComponentScan(basePackages = { "com.baeldung.contexts.services" })
public class RootApplicationConfig {
@Bean
public Greeting greeting() {
Greeting greeting = new Greeting();
greeting.setMessage("Hello World !!");
return greeting;
}
}