com.netflix.zuul.monitoring.MonitoringHelper Java Examples
The following examples show how to use
com.netflix.zuul.monitoring.MonitoringHelper.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: GroovyLoadInitListener.java From pig with MIT License | 5 votes |
@EventListener(value = {EmbeddedServletContainerInitializedEvent.class}) public void init() { MonitoringHelper.initMocks(); FilterLoader.getInstance().setCompiler(new GroovyCompiler()); FilterFileManager.setFilenameFilter(new GroovyFileFilter()); try { FilterFileManager.init(10, groovyPath); } catch (Exception e) { log.error("初始化网关Groovy 文件失败 {}", e); } log.warn("初始化网关Groovy 文件成功"); }
Example #2
Source File: DummyAuthenticationProviderTest.java From api-layer with Eclipse Public License 2.0 | 5 votes |
@BeforeAll public static void setup() { MonitoringHelper.initMocks(); BCryptPasswordEncoder encoder = new BCryptPasswordEncoder(10); UserDetailsService userDetailsService = new InMemoryUserDetailsService(encoder); AuthenticationService authenticationService = mock(AuthenticationService.class); dummyAuthenticationProvider = new DummyAuthenticationProvider(encoder, userDetailsService, authenticationService); }
Example #3
Source File: ZuulApplication.java From spring-cloud-docker-microservice-book-code with Apache License 2.0 | 5 votes |
@Override public void run(String... args) throws Exception { MonitoringHelper.initMocks(); FilterLoader.getInstance().setCompiler(new GroovyCompiler()); try { FilterFileManager.setFilenameFilter(new GroovyFileFilter()); String basePath = "D:/写书/code/microservice-gateway-zuul-filter-groovy/src/main/filters/"; FilterFileManager.init(1, basePath + "pre", basePath + "post"); } catch (Exception e) { throw new RuntimeException(e); } }
Example #4
Source File: ZuulApplication.java From spring-cloud-docker-microservice-book-code with Apache License 2.0 | 5 votes |
@Override public void run(String... args) throws Exception { MonitoringHelper.initMocks(); FilterLoader.getInstance().setCompiler(new GroovyCompiler()); try { FilterFileManager.setFilenameFilter(new GroovyFileFilter()); String basePath = "D:/写书/code/microservice-gateway-zuul-filter-groovy/src/main/filters/"; FilterFileManager.init(1, basePath + "pre", basePath + "post"); } catch (Exception e) { throw new RuntimeException(e); } }
Example #5
Source File: InMemoryUserDetailsServiceTest.java From api-layer with Eclipse Public License 2.0 | 4 votes |
@BeforeAll public static void setup() { MonitoringHelper.initMocks(); encoder = Mockito.mock(BCryptPasswordEncoder.class); inMemoryUserDetailsService = new InMemoryUserDetailsService(encoder); }
Example #6
Source File: TlsErrorCheckTest.java From api-layer with Eclipse Public License 2.0 | 4 votes |
@BeforeAll public static void setup() { MonitoringHelper.initMocks(); MessageService messageService = new YamlMessageService(); errorController = new InternalServerErrorController(messageService); }
Example #7
Source File: TimeoutErrorCheckTest.java From api-layer with Eclipse Public License 2.0 | 4 votes |
@BeforeClass public static void setup() { MonitoringHelper.initMocks(); MessageService messageService = new YamlMessageService(); errorController = new InternalServerErrorController(messageService); }
Example #8
Source File: SecurityTokenErrorCheckTest.java From api-layer with Eclipse Public License 2.0 | 4 votes |
@BeforeAll public static void initMocks() { MonitoringHelper.initMocks(); }
Example #9
Source File: RibbonRetryErrorCheckTest.java From api-layer with Eclipse Public License 2.0 | 4 votes |
@BeforeAll public static void setupAll() { MonitoringHelper.initMocks(); }
Example #10
Source File: ServiceNotFoundCheckTest.java From api-layer with Eclipse Public License 2.0 | 4 votes |
@BeforeEach public void prepareCheckUnderTest() { MonitoringHelper.initMocks(); underTest = new ServiceNotFoundCheck(new YamlMessageService()); }
Example #11
Source File: ServiceNotFoundFilterTest.java From api-layer with Eclipse Public License 2.0 | 4 votes |
@BeforeEach public void prepareFilterUnderTest() { provider = Mockito.mock(RequestContextProvider.class); underTest = new ServiceNotFoundFilter(provider); MonitoringHelper.initMocks(); }