Skip to content

Commit 6f94ba3

Browse files
author
NoteFox
committed
changed from getMapping to requestMapping for defined Post requests
1 parent 0bb6a80 commit 6f94ba3

2 files changed

Lines changed: 6 additions & 8 deletions

File tree

src/main/java/Server/FTPServer/FTPService.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ public void ftpServerSetUp() throws IOException {
6767
serverFactory = new FtpServerFactory();
6868
listenerFactory = new ListenerFactory();
6969

70-
defineSSLConf();
70+
//defineSSLConf();
7171
defineListener();
7272
setUpUser();
7373

src/main/java/Server/SpringClass.java

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,7 @@
77
import ch.qos.logback.core.encoder.EchoEncoder;
88
import org.springframework.boot.SpringApplication;
99
import org.springframework.boot.autoconfigure.SpringBootApplication;
10-
import org.springframework.web.bind.annotation.GetMapping;
11-
import org.springframework.web.bind.annotation.RequestParam;
12-
import org.springframework.web.bind.annotation.RestController;
10+
import org.springframework.web.bind.annotation.*;
1311

1412
import java.io.*;
1513
import java.text.SimpleDateFormat;
@@ -66,7 +64,7 @@ public void queue_map(QueueRequest q) {
6664
serviceThread.interrupt();
6765
}
6866

69-
@GetMapping("/service")
67+
@RequestMapping ("/service")
7068
public String webServiceStatus() {
7169
StringBuilder sb = new StringBuilder();
7270
sb.append("<head> <title> WebService status</title> </head>");
@@ -86,13 +84,13 @@ public String webServiceStatus() {
8684
return sb.toString();
8785
}
8886

89-
@GetMapping("/ftp")
87+
@RequestMapping("/ftp")
9088
public String ftpServiceStatus() {
9189
return ("yeah... working on that");
9290
}
9391

9492
// 192.168.178.35:8080/request?name=mapname&coords=13.005,15.123_13.005,15.123_13.005,15.123_13.005,15.123_13.005,15.123&date=2117-12-11
95-
@GetMapping("/request")
93+
@RequestMapping(value = "/request")
9694
public String request(@RequestParam(value = "name", defaultValue = "noname") String mapname,
9795
@RequestParam(value = "coords") String coords,
9896
@RequestParam(value = "date", defaultValue = "insert") String date) {
@@ -162,7 +160,7 @@ public String request(@RequestParam(value = "name", defaultValue = "noname") Str
162160
return null;
163161
}
164162

165-
@GetMapping("/test")
163+
@RequestMapping("/test")
166164
public String test() {
167165
return ("<head> <title> PageTitle </title> </head> <body> <h1> This is a Heading </h1> <p> This is a paragraph.</p> </body>");
168166
}

0 commit comments

Comments
 (0)