Procházet zdrojové kódy

added spring annotations to certain classes

William Simkins před 6 roky
rodič
revize
0ffb6b4cb8

+ 3
- 0
src/main/java/Controllers/CommentController.java Zobrazit soubor

@@ -1,5 +1,8 @@
1 1
 package Controllers;
2 2
 
3
+import org.springframework.web.bind.annotation.RestController;
4
+
5
+@RestController
3 6
 public class CommentController {
4 7
 
5 8
     public String postComment(int id){

+ 3
- 0
src/main/java/Controllers/MessageController.java Zobrazit soubor

@@ -1,5 +1,8 @@
1 1
 package Controllers;
2 2
 
3
+import org.springframework.web.bind.annotation.RestController;
4
+
5
+@RestController
3 6
 public class MessageController {
4 7
 
5 8
     public String sendMessage(int id){

+ 3
- 0
src/main/java/Controllers/TopicsController.java Zobrazit soubor

@@ -1,5 +1,8 @@
1 1
 package Controllers;
2 2
 
3
+import org.springframework.web.bind.annotation.RestController;
4
+
5
+@RestController
3 6
 public interface TopicsController {
4 7
 
5 8
     public String getDescription();

+ 3
- 0
src/main/java/Controllers/User.java Zobrazit soubor

@@ -1,5 +1,8 @@
1 1
 package Controllers;
2 2
 
3
+import org.springframework.web.bind.annotation.RestController;
4
+
5
+@RestController
3 6
 public abstract class User {
4 7
     private int id;
5 8
     private String name;

+ 3
- 0
src/main/java/Model/Console.java Zobrazit soubor

@@ -1,6 +1,9 @@
1 1
 package Model;
2 2
 
3 3
 public class Console {
4
+
5
+    public String print(){return null; }
6
+
4 7
     public String getStringInput(){
5 8
         return null;
6 9
     }

+ 2
- 0
src/main/java/Model/NewAccountCreator.java Zobrazit soubor

@@ -1,5 +1,7 @@
1 1
 package Model;
2 2
 
3
+import Controllers.User;
4
+
3 5
 public class NewAccountCreator extends User {
4 6
 
5 7
     public NewAccountCreator(int id, String name, String username, String password, String email) {

+ 6
- 2
src/main/java/View/MainApplication.java Zobrazit soubor

@@ -1,7 +1,11 @@
1 1
 package View;
2 2
 
3
-public class MainApplication {
4
-    public static void main(String args){
3
+import org.springframework.boot.SpringApplication;
4
+import org.springframework.boot.autoconfigure.SpringBootApplication;
5 5
 
6
+@SpringBootApplication
7
+public class MainApplication {
8
+    public static void main(String[] args){
9
+        SpringApplication.run(MainApplication.class, args);
6 10
     }
7 11
 }