Refactor services: remove old RestApplication classes and replace with specific service applications

This commit is contained in:
Lemonochrme 2024-12-14 16:21:28 +01:00
parent 3349a77450
commit aab5cf3f3d
6 changed files with 32 additions and 32 deletions

View file

@ -0,0 +1,20 @@
package insa.application.helpapp.rest;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController
public class AdministrationServiceApplication {
public static void main(String[] args) {
SpringApplication.run(AdministrationServiceApplication.class, args);
}
@GetMapping("/hello")
public String hello() {
return "Hello from Administration Service!";
}
}

View file

@ -7,14 +7,14 @@ import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController
public class RestApplication {
public class FeedbackServiceApplication {
public static void main(String[] args) {
SpringApplication.run(RestApplication.class, args);
SpringApplication.run(FeedbackServiceApplication.class, args);
}
@GetMapping("/hello")
public String hello() {
return "Hello from REST!";
return "Hello from FeedBack Service!";
}
}

View file

@ -7,14 +7,14 @@ import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController
public class RestApplication {
public class RequestServiceApplication {
public static void main(String[] args) {
SpringApplication.run(RestApplication.class, args);
SpringApplication.run(RequestServiceApplication.class, args);
}
@GetMapping("/hello")
public String hello() {
return "Hello from REST!";
return "Hello from Request Service!";
}
}

View file

@ -7,14 +7,14 @@ import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController
public class RestApplication {
public class UserServiceApplication {
public static void main(String[] args) {
SpringApplication.run(RestApplication.class, args);
SpringApplication.run(UserServiceApplication.class, args);
}
@GetMapping("/hello")
public String hello() {
return "Hello from REST!";
return "Hello from User Service!";
}
}

View file

@ -1,20 +0,0 @@
package insa.application.helpapp.rest;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController
public class RestApplication {
public static void main(String[] args) {
SpringApplication.run(RestApplication.class, args);
}
@GetMapping("/hello")
public String hello() {
return "Hello from REST!";
}
}

View file

@ -7,14 +7,14 @@ import org.springframework.web.bind.annotation.RestController;
@SpringBootApplication
@RestController
public class RestApplication {
public class VolunteerServiceApplication {
public static void main(String[] args) {
SpringApplication.run(RestApplication.class, args);
SpringApplication.run(VolunteerServiceApplication.class, args);
}
@GetMapping("/hello")
public String hello() {
return "Hello from REST!";
return "Hello from Volunteer Service!";
}
}