educative.io

Educative

includeFilters REGEX is not working

I have ContentBasedFilter under “io.datajek.spring.basics.movierecommendersystem.lesson10_1” and CollaborativeFilter under “io.datajek.spring.basics.movierecommendersystem.lesson10”.
So i am using the includeFilters like below but ContentBasedFilter is not being detected by Spring applicationContext.

@SpringBootApplication
@ComponentScan(basePackages={“io.datajek.spring.basics.movierecommendersystem.lesson10”},
includeFilters=@Filter(type=FilterType.REGEX, pattern=“io.datajek.spring.basics.movierecommendersystem.lesson10_1.*”))
public class MovieRecommenderSystemApplication {

public static void main(String[] args) {
	ApplicationContext appContext = SpringApplication.run(MovieRecommenderSystemApplication.class, args);
	
	System.out.println("ContentBasedFilter bean found?"+ appContext.containsBean("contentBasedFilter")); //returning false
	System.out.println("CollaborativeFiler bean found?"+ appContext.containsBean("collaborativeFilter")); //returning true
	
}

}

@Sumanth Even I faced the same issue. Did you get any lead on this?