7 |
Please Confirm
8 |
9 |
10 | Do you authorize "${authorizationRequest.clientId}" at "${authorizationRequest.redirectUri}" to access your protected resources
11 | with scope ${authorizationRequest.scope?join(", ")}.
12 |
13 |
19 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/microservices/support/config-server/src/main/java/se/callista/microservises/support/ConfigServerApplication.java:
--------------------------------------------------------------------------------
1 | package se.callista.microservises.support;
2 |
3 | import org.slf4j.Logger;
4 | import org.slf4j.LoggerFactory;
5 | import org.springframework.amqp.rabbit.connection.CachingConnectionFactory;
6 | import org.springframework.amqp.rabbit.connection.ConnectionFactory;
7 | import org.springframework.beans.factory.annotation.Value;
8 | import org.springframework.boot.SpringApplication;
9 | import org.springframework.boot.autoconfigure.SpringBootApplication;
10 | import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
11 | import org.springframework.cloud.config.server.EnableConfigServer;
12 | import org.springframework.context.ConfigurableApplicationContext;
13 | import org.springframework.context.annotation.Bean;
14 |
15 | @EnableConfigServer
16 | @EnableDiscoveryClient
17 | @SpringBootApplication
18 | public class ConfigServerApplication {
19 |
20 | private static final Logger LOG = LoggerFactory.getLogger(ConfigServerApplication.class);
21 |
22 | public static void main(String[] args) {
23 | ConfigurableApplicationContext ctx = SpringApplication.run(ConfigServerApplication.class, args);
24 |
25 | LOG.info("Connected to RabbitMQ at: {}", ctx.getEnvironment().getProperty("spring.rabbitmq.host"));
26 | }
27 | }
28 |
--------------------------------------------------------------------------------
/util/src/test/java/se/callista/microservices/util/ServiceUtilsTests.java:
--------------------------------------------------------------------------------
1 | package se.callista.microservices.util;
2 |
3 | import org.junit.Test;
4 | import org.slf4j.MDC;
5 |
6 | import static org.junit.Assert.assertEquals;
7 | import static org.junit.Assert.assertNull;
8 |
9 | public class ServiceUtilsTests {
10 |
11 |
12 | @Test
13 | public void someTest() {
14 | assertEquals("ok", "ok");
15 | }
16 |
17 | @Test
18 | public void mdcTest() {
19 |
20 | final String KEY = "A";
21 |
22 | try {
23 |
24 | {
25 | String a0 = MDC.get(KEY);
26 | assertNull(a0);
27 | }
28 |
29 | {
30 | MDC.put(KEY, "1");
31 | String a1 = MDC.get(KEY);
32 | assertEquals(a1, "1");
33 | }
34 |
35 | {
36 | MDC.remove(KEY);
37 | String a1_gone = MDC.get(KEY);
38 | assertNull(a1_gone);
39 | }
40 |
41 | {
42 | MDC.put(KEY, "2");
43 | String a2 = MDC.get(KEY);
44 | assertEquals(a2, "2");
45 | }
46 |
47 | } finally {
48 | MDC.remove(KEY);
49 | String a2_gone = MDC.get(KEY);
50 | assertNull(a2_gone);
51 | }
52 |
53 | }
54 | }
55 |
--------------------------------------------------------------------------------
/util/src/main/resources/defaultLogbackConfig.xml:
--------------------------------------------------------------------------------
1 |
2 |