-
-
Notifications
You must be signed in to change notification settings - Fork 93
Expand file tree
/
Copy pathRootConfig.java
More file actions
29 lines (27 loc) · 1.1 KB
/
RootConfig.java
File metadata and controls
29 lines (27 loc) · 1.1 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.bobocode.config;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Controller;
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
/**
* This class provides application root (non-web) configuration.
* <p>
* todo: 1. Mark this class as config
* todo: 2. Enable component scanning for all packages in "com.bobocode" using annotation property "basePackages"
* todo: 3. Exclude web related config and beans (ignore @{@link Controller}, ignore {@link EnableWebMvc})
*/
@Configuration
@ComponentScan(basePackages = "com.bobocode",
excludeFilters = {
@ComponentScan.Filter(
type = FilterType.ANNOTATION,
classes = Controller.class
),
@ComponentScan.Filter(
type = FilterType.ANNOTATION,
classes = EnableWebMvc.class
)
})
public class RootConfig {
}