Skip to content

Commit e79af4c

Browse files
author
Greg Meyer
authored
Merge pull request #6 from DirectProjectJavaRI/develop
Releasing 7.0
2 parents ba8e952 + 0ebf1c9 commit e79af4c

File tree

5 files changed

+123
-23
lines changed

5 files changed

+123
-23
lines changed

pom.xml

Lines changed: 25 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<artifactId>direct-common</artifactId>
66
<name>Direct Project common APIs</name>
7-
<version>6.0.1</version>
7+
<version>7.0</version>
88
<description>Direct Project common APIs. Includes instrumentation, auditing, and other utility APIs</description>
99
<inceptionYear>2010</inceptionYear>
1010
<url>http://api.nhindirect.org/x/www/api.nhindirect.org/java/site/direct-common/${project.version}</url>
@@ -28,7 +28,7 @@
2828
<parent>
2929
<groupId>org.springframework.boot</groupId>
3030
<artifactId>spring-boot-dependencies</artifactId>
31-
<version>2.1.6.RELEASE</version>
31+
<version>2.2.4.RELEASE</version>
3232
</parent>
3333
<scm>
3434
<url>scm:git:https://github.com/DirectProjectJavaRI/direct-common.git</url>
@@ -45,14 +45,14 @@
4545
<dependency>
4646
<groupId>org.springframework.boot</groupId>
4747
<artifactId>spring-boot-dependencies</artifactId>
48-
<version>2.1.6.RELEASE</version>
48+
<version>2.2.2.RELEASE</version>
4949
<type>pom</type>
5050
<scope>import</scope>
5151
</dependency>
5252
<dependency>
5353
<groupId>org.springframework.cloud</groupId>
5454
<artifactId>spring-cloud-starter-parent</artifactId>
55-
<version>Greenwich.SR1</version>
55+
<version>Hoxton.SR1</version>
5656
<type>pom</type>
5757
<scope>import</scope>
5858
</dependency>
@@ -65,13 +65,7 @@
6565
</dependency>
6666
<dependency>
6767
<groupId>org.springframework.cloud</groupId>
68-
<artifactId>spring-cloud-starter-openfeign</artifactId>
69-
<exclusions>
70-
<exclusion>
71-
<groupId>org.bouncycastle</groupId>
72-
<artifactId>bcpkix-jdk15on</artifactId>
73-
</exclusion>
74-
</exclusions>
68+
<artifactId>spring-cloud-starter-openfeign</artifactId>
7569
</dependency>
7670
<dependency>
7771
<groupId>org.springframework.cloud</groupId>
@@ -84,7 +78,22 @@
8478
<dependency>
8579
<groupId>org.springframework</groupId>
8680
<artifactId>spring-messaging</artifactId>
87-
</dependency>
81+
</dependency>
82+
<dependency>
83+
<groupId>io.pivotal.cfenv</groupId>
84+
<artifactId>java-cfenv-boot</artifactId>
85+
<version>2.1.0.RELEASE</version>
86+
</dependency>
87+
<dependency>
88+
<groupId>io.pivotal.cfenv</groupId>
89+
<artifactId>java-cfenv-test-support</artifactId>
90+
<scope>test</scope>
91+
</dependency>
92+
<dependency>
93+
<groupId>com.google.guava</groupId>
94+
<artifactId>guava</artifactId>
95+
<version>28.2-jre</version>
96+
</dependency>
8897
<dependency>
8998
<groupId>javax.mail</groupId>
9099
<artifactId>mail</artifactId>
@@ -126,17 +135,12 @@
126135
<dependency>
127136
<groupId>org.bouncycastle</groupId>
128137
<artifactId>bcprov-jdk15on</artifactId>
129-
<version>1.60</version>
138+
<version>1.64</version>
130139
</dependency>
131140
<dependency>
132141
<groupId>org.bouncycastle</groupId>
133142
<artifactId>bcmail-jdk15on</artifactId>
134-
<version>1.60</version>
135-
</dependency>
136-
<dependency>
137-
<groupId>org.springframework.boot</groupId>
138-
<artifactId>spring-boot-starter-tomcat</artifactId>
139-
<scope>test</scope>
143+
<version>1.64</version>
140144
</dependency>
141145
<dependency>
142146
<groupId>org.springframework.boot</groupId>
@@ -281,8 +285,7 @@
281285
</goals>
282286
</execution>
283287
</executions>
284-
</plugin>
285-
<!-- for releases only
288+
</plugin>
286289
<plugin>
287290
<groupId>org.apache.maven.plugins</groupId>
288291
<artifactId>maven-gpg-plugin</artifactId>
@@ -295,8 +298,7 @@
295298
</goals>
296299
</execution>
297300
</executions>
298-
</plugin>
299-
-->
301+
</plugin>
300302
</plugins>
301303
</build>
302304
<reporting>
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Environment Post Processors
2+
org.springframework.boot.env.EnvironmentPostProcessor=\
3+
org.nhindirect.common.cfenv.r2dbc.CfR2DBCDataSourceEnvironmentPostProcessor
4+
# Also register as a ApplicationListener to log what occurred in the post processing step
5+
org.springframework.context.ApplicationListener=\
6+
org.nhindirect.common.cfenv.r2dbc.CfR2DBCDataSourceEnvironmentPostProcessor

src/site/apt/releaseNotes.apt

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,24 @@
66
Greg Meyer
77
---
88

9+
{7.0}
10+
11+
Changes included with release 7.0
12+
13+
[]
14+
15+
Enhancements
16+
17+
* Updated to SpringBoot 2.2.x and SpringCloud Hoxton SR1
18+
19+
* Added java cfenv processor for jdbc connection url to r2dbc spring boot properties.
20+
21+
[]
22+
23+
Bug Fixes
24+
25+
* NA
26+
927
{6.0.1}
1028

1129
Changes included with release 6.0.1
Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
package org.nhindirect.common.cfenv.r2dbc;
2+
3+
import static org.junit.Assert.assertEquals;
4+
5+
import java.io.File;
6+
import java.nio.file.Files;
7+
8+
import org.junit.Test;
9+
import org.springframework.context.ConfigurableApplicationContext;
10+
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
11+
import org.springframework.util.ResourceUtils;
12+
13+
import io.pivotal.cfenv.test.AbstractCfEnvTests;
14+
15+
public class CfR2DBCDataSourceEnvironmentPostProcessorTest extends AbstractCfEnvTests
16+
{
17+
private final CfR2DBCDataSourceEnvironmentPostProcessor environmentPostProcessor = new CfR2DBCDataSourceEnvironmentPostProcessor();
18+
19+
private final ConfigurableApplicationContext context = new AnnotationConfigApplicationContext();
20+
21+
@Test
22+
public void testParseVCAPToR2dbcProps() throws Exception
23+
{
24+
System.setProperty("VCAP_APPLICATION", "yes");
25+
26+
try
27+
{
28+
// To setup values used by CfEnv
29+
File file = ResourceUtils.getFile("classpath:cf/vcap-services.json");
30+
String fileContents = new String(Files.readAllBytes(file.toPath()));
31+
mockVcapServices(fileContents);
32+
33+
environmentPostProcessor.postProcessEnvironment(this.context.getEnvironment(), null);
34+
35+
final String url = this.context.getEnvironment().getProperty("spring.r2dbc.url");
36+
37+
assertEquals("r2dbcs:mysql://10.0.4.35:3306/cf_2e23d10a_8738_8c3c_66cf_13e44422698c?useSSL=true&requireSSL=true", url);
38+
}
39+
finally
40+
{
41+
System.clearProperty("VCAP_APPLICATION");
42+
}
43+
}
44+
}
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
{
2+
"p-mysql": [
3+
{
4+
"credentials": {
5+
"hostname": "10.0.4.35",
6+
"port": 3306,
7+
"tls": {
8+
"cert": {
9+
"ca": "-----BEGIN CERTIFICATE-----\nMIIDMTCCAhmgAwIBAgIUPOWXkDAcZ9AjqPMQBaotdRtJKlkwDQYJKoZIhvcNAQEL\nBQAwETEPMA0GA1UEAxMGcm9vdENBMB4XDTE4MTAwODIwMzAxNFoXDTE5MTAwODIw\nMzAxNFowETEPMA0GA1UEAxMGcm9vdENBMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8A\nMIIBCgKCAQEAqEIHGn3X5zIfH7kNT0J8aloM8BOGYYozIEksLJhjy3ZJJTJeScxI\nEv/U3sw2iTf1X2SkwUPkd/5T0GdTJe+5JY5oJFNOJlaO+8pcJ/UctrDuG3AeeIdR\n3ZmupyCrbcD+rRfhMaykFBHYzhpsqAuVdWAvG2995mqFyzBVnRjK98Dz5e3txCgf\nhlcLkM3xg01uZUEjmp+QSNqg+dE5kafxil/GfaP6i7TLbmIfg5vGYjcK0ws1HsI7\nM4VTrOime/dDQP7pVuN/7vml4jQtDxrbET7nQWskna35ztzagGU9qIwpPM8t3+U8\nb8ASTYxc3Tp6oMpBiAv5Le1mWWRzwfSaRQIDAQABo4GAMH4wHQYDVR0OBBYEFOXj\nuomG9Ud4GPTNjSJBaxhf2mNLMEwGA1UdIwRFMEOAFOXjuomG9Ud4GPTNjSJBaxhf\n2mNLoRWkEzARMQ8wDQYDVQQDEwZyb290Q0GCFDzll5AwHGfQI6jzEAWqLXUbSSpZ\nMA8GA1UdEwEB/wQFMAMBAf8wDQYJKoZIhvcNAQELBQADggEBAEJ9+njsPiIZh5MS\nUpJX+doHbIUU+2KPe9hMTYiIlh2NJrzPMtTO+kRlWInscQMorQ3/sGUP/oj4lBYd\nxpg+WcKicn5uYJsCMk8GaW+bfw6t6HTEw/hEHJersgtMuMUv2IecyZbwdR0grxMG\nMpq60tvd9YiIi5ZVRa5cHqTryGqAA/6W8SNy/BXeuHRac0tGhszTCjceSttRJgTN\nb1i/J2f74HRoe0TQKrZ2W7kGOuUiPSWn9ziVjKwnXJKZw2FyHPtpnQhKCaVFs95L\nB5hRRfgz3E36YJSXj4PLCMqsONNL3wW/HUhAwXopVgwKOJSYQYnt8mqFqWFAeiZ8\nQMiW4lM=\n-----END CERTIFICATE-----\n"
10+
}
11+
},
12+
"name": "mysql_name",
13+
"username": "mysql_username",
14+
"password": "mysql_password",
15+
"uri": "mysql://mysql_username:mysql_password@10.0.4.35:3306/cf_2e23d10a_8738_8c3c_66cf_13e44422698c?reconnect=true",
16+
"jdbcUrl": "jdbc:mysql://10.0.4.35:3306/cf_2e23d10a_8738_8c3c_66cf_13e44422698c?user=mysql_username&password=mysql_password&useSSL=true&requireSSL=true"
17+
},
18+
"syslog_drain_url": null,
19+
"volume_mounts": [],
20+
"label": "p-mysql",
21+
"provider": null,
22+
"plan": "100mb",
23+
"name": "mysql",
24+
"tags": [
25+
"mysql",
26+
"relational"
27+
]
28+
}
29+
]
30+
}

0 commit comments

Comments
 (0)