-
-
Notifications
You must be signed in to change notification settings - Fork 469
Expand file tree
/
Copy pathAppConfig.java
More file actions
23 lines (19 loc) · 787 Bytes
/
AppConfig.java
File metadata and controls
23 lines (19 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package io.sentry.samples.spring;
import io.sentry.IScopes;
import io.sentry.spring.SentryUserFilter;
import io.sentry.spring.SentryUserProvider;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Import;
@Configuration
@Import(SentryConfig.class)
public class AppConfig {
@Autowired private ApplicationContext applicationContext;
@Bean
SentryUserFilter sentryUserFilter(final List<SentryUserProvider> sentryUserProviders) {
return new SentryUserFilter(applicationContext.getBean(IScopes.class), sentryUserProviders);
}
}