Skip to content

Commit 8a71eec

Browse files
author
Greg Meyer
authored
Merge pull request #5 from DirectProjectJavaRI/develop
Releasing 8.0.0
2 parents 8771008 + bd4ae5d commit 8a71eec

File tree

6 files changed

+75
-77
lines changed

6 files changed

+75
-77
lines changed

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
hs_err_pid*
2424
/.classpath
2525
/.project
26+
/target/

pom.xml

Lines changed: 50 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<modelVersion>4.0.0</modelVersion>
55
<artifactId>dns-sboot</artifactId>
66
<name>Direct Project DNS Server SpringBoot Application</name>
7-
<version>6.0.1</version>
7+
<version>8.0.0</version>
88
<description>Direct Project DNS Server SpringBoot Application</description>
99
<inceptionYear>2010</inceptionYear>
1010
<url>https://github.com/DirectProjectJavaRI/dns-sboot</url>
@@ -27,14 +27,19 @@
2727
<connection>scm:git:https://github.com/DirectProjectJavaRI/dns-sboot.git</connection>
2828
</scm>
2929
<prerequisites>
30-
<maven>3.0.0</maven>
30+
<maven>3.5.0</maven>
3131
</prerequisites>
3232
<parent>
3333
<groupId>org.springframework.boot</groupId>
3434
<artifactId>spring-boot-starter-parent</artifactId>
35-
<version>2.1.6.RELEASE</version>
35+
<version>2.5.2</version>
3636
<relativePath />
37-
</parent>
37+
</parent>
38+
<properties>
39+
<dnsjava.version>3.3.1</dnsjava.version>
40+
<mina-core.version>2.1.4</mina-core.version>
41+
<bcprov-jdk15on.version>1.68</bcprov-jdk15on.version>
42+
</properties>
3843
<licenses>
3944
<license>
4045
<name>New BSD License</name>
@@ -46,21 +51,21 @@
4651
<dependency>
4752
<groupId>org.springframework.boot</groupId>
4853
<artifactId>spring-boot-dependencies</artifactId>
49-
<version>2.1.6.RELEASE</version>
54+
<version>2.5.1</version>
5055
<type>pom</type>
5156
<scope>import</scope>
5257
</dependency>
5358
<dependency>
5459
<groupId>io.pivotal.spring.cloud</groupId>
5560
<artifactId>spring-cloud-services-dependencies</artifactId>
56-
<version>2.1.1.RELEASE</version>
61+
<version>3.3.0</version>
5762
<type>pom</type>
5863
<scope>import</scope>
5964
</dependency>
6065
<dependency>
6166
<groupId>org.springframework.cloud</groupId>
6267
<artifactId>spring-cloud-starter-parent</artifactId>
63-
<version>Greenwich.SR1</version>
68+
<version>2020.0.3</version>
6469
<type>pom</type>
6570
<scope>import</scope>
6671
</dependency>
@@ -79,10 +84,10 @@
7984
<groupId>org.springframework.cloud</groupId>
8085
<artifactId>spring-cloud-starter-config</artifactId>
8186
</dependency>
82-
<dependency>
83-
<groupId>org.springframework.cloud</groupId>
84-
<artifactId>spring-cloud-starter-netflix-eureka-client</artifactId>
85-
</dependency>
87+
<dependency>
88+
<groupId>org.springframework.cloud</groupId>
89+
<artifactId>spring-cloud-starter-bootstrap</artifactId>
90+
</dependency>
8691
<dependency>
8792
<groupId>io.pivotal.spring.cloud</groupId>
8893
<artifactId>spring-cloud-services-starter-config-client</artifactId>
@@ -96,32 +101,37 @@
96101
<dependency>
97102
<groupId>org.bouncycastle</groupId>
98103
<artifactId>bcprov-jdk15on</artifactId>
99-
<version>1.60</version>
104+
<version>${bcprov-jdk15on.version}</version>
100105
</dependency>
101106
<dependency>
102107
<groupId>dnsjava</groupId>
103108
<artifactId>dnsjava</artifactId>
104-
<version>2.1.8</version>
109+
<version>${dnsjava.version}</version>
105110
</dependency>
106111
<dependency>
107112
<groupId>org.nhind</groupId>
108113
<artifactId>dns</artifactId>
109-
<version>6.0.1</version>
110-
</dependency>
114+
<version>8.0.0</version>
115+
</dependency>
116+
<dependency>
117+
<groupId>org.nhind</groupId>
118+
<artifactId>config-model</artifactId>
119+
<version>8.0.0</version>
120+
</dependency>
111121
<dependency>
112122
<groupId>org.nhind</groupId>
113123
<artifactId>config-service-client</artifactId>
114-
<version>6.0</version>
124+
<version>8.0.0</version>
115125
</dependency>
116126
<dependency>
117127
<groupId>org.nhind</groupId>
118128
<artifactId>direct-policy</artifactId>
119-
<version>6.0</version>
129+
<version>8.0.0</version>
120130
</dependency>
121131
<dependency>
122132
<groupId>org.nhind</groupId>
123133
<artifactId>direct-common</artifactId>
124-
<version>6.0.1</version>
134+
<version>8.0.0</version>
125135
</dependency>
126136
</dependencies>
127137
<build>
@@ -168,8 +178,8 @@
168178
<plugin>
169179
<groupId>org.apache.maven.plugins</groupId>
170180
<artifactId>maven-jxr-plugin</artifactId>
181+
<version>3.1.1</version>
171182
</plugin>
172-
173183
<plugin>
174184
<groupId>org.apache.maven.plugins</groupId>
175185
<artifactId>maven-compiler-plugin</artifactId>
@@ -201,38 +211,32 @@
201211
</execution>
202212
</executions>
203213
</plugin>
204-
<plugin>
205-
<groupId>org.apache.maven.plugins</groupId>
206-
<artifactId>maven-jar-plugin</artifactId>
207-
<configuration>
208-
<archive>
209-
<index>true</index>
210-
<!--<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
211-
-->
212-
</archive>
213-
</configuration>
214-
</plugin>
215-
<plugin>
216-
<groupId>org.apache.maven.plugins</groupId>
217-
<artifactId>maven-jar-plugin</artifactId>
218-
<executions>
219-
<execution>
220-
<goals>
221-
<goal>test-jar</goal>
222-
</goals>
223-
</execution>
224-
</executions>
225-
</plugin>
214+
<plugin>
215+
<groupId>org.apache.maven.plugins</groupId>
216+
<artifactId>maven-jar-plugin</artifactId>
217+
<configuration>
218+
<archive>
219+
<index>true</index>
220+
</archive>
221+
</configuration>
222+
<executions>
223+
<execution>
224+
<goals>
225+
<goal>test-jar</goal>
226+
</goals>
227+
</execution>
228+
</executions>
229+
</plugin>
230+
226231
<plugin>
227232
<groupId>org.springframework.boot</groupId>
228233
<artifactId>spring-boot-maven-plugin</artifactId>
229234
</plugin>
230235
<plugin>
231236
<groupId>org.apache.maven.plugins</groupId>
232237
<artifactId>maven-javadoc-plugin</artifactId>
233-
<version>2.9.1</version>
234238
<configuration>
235-
<additionalparam>-Xdoclint:none</additionalparam>
239+
<additionalJOption>-Xdoclint:none</additionalJOption>
236240
<charset>UTF-8</charset>
237241
<docencoding>UTF-8</docencoding>
238242
<docfilessubdirs>true</docfilessubdirs>
@@ -264,6 +268,7 @@
264268
</goals>
265269
</execution>
266270
</executions>
271+
<version>3.0.1</version>
267272
</plugin>
268273
-->
269274
</plugins>
@@ -273,14 +278,12 @@
273278
<plugin>
274279
<groupId>org.apache.maven.plugins</groupId>
275280
<artifactId>maven-project-info-reports-plugin</artifactId>
276-
<version>2.9</version>
277281
</plugin>
278282
<plugin>
279283
<groupId>org.apache.maven.plugins</groupId>
280284
<artifactId>maven-javadoc-plugin</artifactId>
281-
<version>2.9.1</version>
282285
<configuration>
283-
<additionalparam>-Xdoclint:none</additionalparam>
286+
<additionalJOption>-Xdoclint:none</additionalJOption>
284287
<charset>UTF-8</charset>
285288
<docencoding>UTF-8</docencoding>
286289
<docfilessubdirs>true</docfilessubdirs>
@@ -304,6 +307,7 @@
304307
<plugin>
305308
<groupId>org.apache.maven.plugins</groupId>
306309
<artifactId>maven-jxr-plugin</artifactId>
310+
<version>3.1.1</version>
307311
</plugin>
308312
<plugin>
309313
<groupId>org.codehaus.mojo</groupId>

src/main/java/org/nhindirect/dns/boot/DNSServerApplication.java

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -21,13 +21,9 @@ Neither the name of The Direct Project (directproject.org) nor the names of its
2121

2222
import org.nhindirect.dns.DNSException;
2323
import org.nhindirect.dns.DNSServerSettings;
24-
import org.nhindirect.dns.RESTServiceDNSStore;
2524
import org.nhindirect.dns.service.DNSServerService;
26-
import org.slf4j.Logger;
27-
import org.slf4j.LoggerFactory;
2825
import org.springframework.beans.factory.annotation.Autowired;
2926
import org.springframework.boot.CommandLineRunner;
30-
import org.springframework.boot.SpringApplication;
3127
import org.springframework.boot.WebApplicationType;
3228
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
3329
import org.springframework.boot.autoconfigure.SpringBootApplication;
@@ -37,14 +33,15 @@ Neither the name of The Direct Project (directproject.org) nor the names of its
3733
import org.springframework.boot.builder.SpringApplicationBuilder;
3834
import org.springframework.context.annotation.ComponentScan;
3935

36+
import lombok.extern.slf4j.Slf4j;
37+
4038
@ComponentScan("org.nhindirect.dns")
4139
@EnableAutoConfiguration(exclude = {DataSourceAutoConfiguration.class,
4240
DataSourceTransactionManagerAutoConfiguration.class, HibernateJpaAutoConfiguration.class})
4341
@SpringBootApplication
42+
@Slf4j
4443
public class DNSServerApplication implements CommandLineRunner
4544
{
46-
private static final Logger LOGGER = LoggerFactory.getLogger(RESTServiceDNSStore.class);
47-
4845
@Autowired
4946
protected DNSServerService dnsService;
5047

@@ -67,13 +64,10 @@ public class DNSServerApplication implements CommandLineRunner
6764

6865
public static void main(String[] args)
6966
{
70-
SpringApplication springApplication =
71-
new SpringApplicationBuilder()
72-
.sources(DNSServerApplication.class)
73-
.web(WebApplicationType.NONE)
74-
.build();
75-
76-
springApplication.run(args);
67+
new SpringApplicationBuilder()
68+
.sources(DNSServerApplication.class)
69+
.web(WebApplicationType.NONE)
70+
.run(args);
7771
}
7872

7973
@Override
@@ -90,21 +84,21 @@ private void startAndRun()
9084
StringBuffer buffer = new StringBuffer("Starting DNS server. Settings:");
9185
buffer.append("\r\n\tBind Addresses: ").append(settings.getBindAddress());
9286
buffer.append("\r\n\tListen Port: ").append(settings.getPort());
93-
LOGGER.info(buffer.toString() + "\n");
87+
log.info(buffer.toString() + "\n");
9488

9589
try
9690
{
9791
dnsService.startServer();
9892
}
9993
catch (DNSException e)
10094
{
101-
LOGGER.error("Server failed to start: " + e.getMessage(), e);
95+
log.error("Server failed to start: " + e.getMessage(), e);
10296
return;
10397
}
10498

10599
if (mode.equalsIgnoreCase(MODE_STANDALONE))
106100
{
107-
LOGGER.info("\r\nServer running.... Press Enter or Return to stop.");
101+
log.info("\r\nServer running.... Press Enter or Return to stop.");
108102

109103
InputStreamReader input = new InputStreamReader(System.in);
110104
BufferedReader reader = new BufferedReader(input);
@@ -113,21 +107,21 @@ private void startAndRun()
113107
{
114108
reader.readLine();
115109

116-
LOGGER.info("Shutting down server. Wait 5 seconds for cleanup.");
110+
log.info("Shutting down server. Wait 5 seconds for cleanup.");
117111

118112
dnsService.stopService();
119113

120114
Thread.sleep(5000);
121115

122-
LOGGER.info("Server stopped");
116+
log.info("Server stopped");
123117
}
124118
catch (Exception e)
125119
{
126120

127121
}
128122
}
129123
else
130-
LOGGER.info("\r\nServer running.");
124+
log.info("\r\nServer running.");
131125
}
132126

133127
}

src/main/resources/application.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,4 +6,8 @@ direct:
66
basic:
77
user:
88
name: admin
9-
password: d1r3ct;
9+
password: d1r3ct;
10+
11+
config:
12+
service:
13+
url: http://localhost:8080/config-service

src/main/resources/bootstrap.properties

Lines changed: 0 additions & 11 deletions
This file was deleted.

src/main/resources/bootstrap.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
spring:
2+
application:
3+
name: direct-dns-server
4+
5+
main:
6+
allow-bean-definition-overriding: true

0 commit comments

Comments
 (0)