Skip to content

Commit 77a070b

Browse files
authored
Merge pull request #259 from Dokyeongyun/ft-220531-downloaderApp
Ft 220531 downloader app
2 parents a6d17ff + c5dd131 commit 77a070b

File tree

7 files changed

+701
-61
lines changed

7 files changed

+701
-61
lines changed

DBMonitoringDownloaderApp/build.gradle

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ buildscript {
33
mavenCentral()
44
}
55
dependencies {
6-
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.6.4")
6+
classpath("org.springframework.boot:spring-boot-gradle-plugin:2.6.7")
77
}
88
}
99

1010
plugins {
1111
id 'java'
12-
id 'org.springframework.boot' version '2.6.4'
12+
id 'org.springframework.boot' version '2.6.7'
1313
id 'io.spring.dependency-management' version '1.0.7.RELEASE'
1414
}
1515

@@ -19,7 +19,8 @@ repositories {
1919

2020
dependencies {
2121
// Spring
22-
implementation group: 'org.springframework.boot', name: 'spring-boot-starter-thymeleaf', version: '2.6.4'
22+
implementation 'org.springframework.boot:spring-boot-starter-thymeleaf:2.6.7'
23+
implementation 'org.springframework.boot:spring-boot-devtools:2.6.7'
2324
implementation 'org.springframework.boot:spring-boot-starter-web'
2425

2526
// Logback
Lines changed: 5 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,6 @@
11
spring:
2-
application:
3-
name: DBMonitoringDownloaderApp
4-
http:
5-
encoding:
6-
charset: UTF-8
7-
enabled: true
8-
force: true
9-
server:
10-
port: 8081
11-
servlet:
12-
context-path: /
13-
14-
logging:
15-
config: config/logback.xml
16-
17-
#logging:
18-
# level:
19-
# root: info
2+
thymeleaf:
3+
cache: false
4+
devtools:
5+
livereload:
6+
enabled: true
Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,35 @@
11
package root.handler;
22

3-
import java.util.ArrayList;
4-
import java.util.List;
3+
import java.time.LocalDateTime;
4+
import java.time.ZoneId;
5+
import java.util.*;
56

67
import org.springframework.stereotype.Controller;
78
import org.springframework.ui.Model;
89
import org.springframework.web.bind.annotation.GetMapping;
10+
import root.model.ReleaseInfo;
911

1012
@Controller
1113
public class HomeHandler {
1214

13-
@GetMapping(path = "/")
14-
public String home(Model model) {
15-
List<String> downloadLinks = new ArrayList<>();
16-
downloadLinks.add("https://DBMonitoring.co.kr/download/release-1.0.0");
17-
downloadLinks.add("https://DBMonitoring.co.kr/download/release-1.0.1");
18-
downloadLinks.add("https://DBMonitoring.co.kr/download/release-1.1.0");
19-
downloadLinks.add("https://DBMonitoring.co.kr/download/release-1.1.1");
20-
model.addAttribute("downloadLinks", downloadLinks);
21-
return "index";
22-
}
15+
@GetMapping(path = "/")
16+
public String home(Model model) {
17+
18+
model.addAttribute("title", "Project DBMonitoring");
19+
20+
Calendar cal = Calendar.getInstance();
21+
cal.set(2022, Calendar.JUNE, 1);
22+
ReleaseInfo r1 = new ReleaseInfo();
23+
r1.setAppName("DBMonitoring");
24+
r1.setReleaseVersion("1.0.0");
25+
r1.setReleaseDate(LocalDateTime.ofInstant(cal.toInstant(), ZoneId.systemDefault()));
26+
r1.setDownloadLink("https://github.com/Dokyeongyun/DBMonitoring/releases/download/v1.0.0/DBMonitoring-1.0.0.zip");
27+
r1.setReleaseNoteLink("https://github.com/Dokyeongyun/DBMonitoring/releases/tag/v1.0.0");
28+
29+
List<ReleaseInfo> releaseList = new ArrayList<>();
30+
releaseList.add(r1);
31+
32+
model.addAttribute("releaseList", releaseList);
33+
return "index";
34+
}
2335
}
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
package root.model;
2+
3+
import lombok.Data;
4+
5+
import java.time.LocalDateTime;
6+
7+
@Data
8+
public class ReleaseInfo {
9+
private String appName;
10+
private String releaseVersion;
11+
private LocalDateTime releaseDate;
12+
private String downloadLink;
13+
private String releaseNoteLink;
14+
}

0 commit comments

Comments
 (0)