mirror of
https://github.com/Lemonochrme/service-architecture.git
synced 2025-06-08 05:30:50 +02:00
Refactor services: remove old RestApplication classes and replace with specific service applications
This commit is contained in:
parent
3349a77450
commit
aab5cf3f3d
6 changed files with 32 additions and 32 deletions
|
@ -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!";
|
||||
}
|
||||
}
|
|
@ -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!";
|
||||
}
|
||||
}
|
|
@ -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!";
|
||||
}
|
||||
}
|
|
@ -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!";
|
||||
}
|
||||
}
|
|
@ -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!";
|
||||
}
|
||||
}
|
|
@ -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!";
|
||||
}
|
||||
}
|
Loading…
Add table
Reference in a new issue