Prechádzať zdrojové kódy

Remove more tailing slashes (Mapping\(\s*path\s*=\s*".+)/"

Riccardo Balbo 4 rokov pred
rodič
commit
8cac1e5678

+ 3 - 3
src/main/java/com/jayfella/website/controller/api/ApiAvatarController.java

@@ -27,7 +27,7 @@ public class ApiAvatarController {
     private UserRepository userRepository;
     @Autowired private ImageService imageService;
 
-    @PostMapping(path = "/system-managed/")
+    @PostMapping(path = "/system-managed")
     public ResponseEntity updateSystemManagedAvatar(ModelMap model,
                                                     @RequestBody ChangeSystemManagedAvatarRequest csmaRequest) throws IOException {
 
@@ -55,7 +55,7 @@ public class ApiAvatarController {
         return updateUserAvatar(user, imageData);
     }
 
-    @PostMapping(path = "/gravatar/")
+    @PostMapping(path = "/gravatar")
     public ResponseEntity updateGravatarAvatar(ModelMap model,
                                                @RequestBody ChangeGravatarAvatarRequest cgaRequest) throws IOException {
 
@@ -69,7 +69,7 @@ public class ApiAvatarController {
         return updateUserAvatar(user, imageData);
     }
 
-    @PostMapping(path = "/custom/")
+    @PostMapping(path = "/custom")
     public ResponseEntity updateCustomAvatar(@RequestParam(value = "avatar") MultipartFile multipartFile,
                                              ModelMap model) throws IOException, InvalidImageException {
 

+ 1 - 1
src/main/java/com/jayfella/website/controller/api/ApiUserController.java

@@ -30,7 +30,7 @@ import java.util.List;
 import static com.jayfella.website.core.ServerAdvice.KEY_USER;
 
 @RestController
-@RequestMapping(path = "/api/user/")
+@RequestMapping(path = "/api/user")
 public class ApiUserController {
 
     @Autowired private SessionRepository sessionRepository;

+ 1 - 1
src/main/java/com/jayfella/website/controller/http/BlogController.java

@@ -6,7 +6,7 @@ import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 @Controller
-@RequestMapping(path = "/blog/", produces = MediaType.TEXT_HTML_VALUE)
+@RequestMapping(path = "/blog", produces = MediaType.TEXT_HTML_VALUE)
 public class BlogController {
 
     @GetMapping()

+ 1 - 1
src/main/java/com/jayfella/website/controller/http/CategoryController.java

@@ -11,7 +11,7 @@ import org.springframework.web.bind.annotation.RequestMapping;
 import java.io.IOException;
 
 @Controller
-@RequestMapping(path = "/category/", produces = MediaType.TEXT_HTML_VALUE)
+@RequestMapping(path = "/category", produces = MediaType.TEXT_HTML_VALUE)
 public class CategoryController {
 
     @Autowired private CategoryRepository categoryRepository;

+ 1 - 1
src/main/java/com/jayfella/website/controller/http/ContactUsController.java

@@ -8,7 +8,7 @@ import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 
 @Controller
-@RequestMapping(path = "/contact/", produces = MediaType.TEXT_HTML_VALUE)
+@RequestMapping(path = "/contact", produces = MediaType.TEXT_HTML_VALUE)
 public class ContactUsController {
 
     @GetMapping

+ 1 - 1
src/main/java/com/jayfella/website/controller/http/ImageController.java

@@ -19,7 +19,7 @@ import java.io.IOException;
 import java.nio.file.Files;
 
 @Controller
-@RequestMapping(path = "/image/", produces = MediaType.IMAGE_JPEG_VALUE)
+@RequestMapping(path = "/image", produces = MediaType.IMAGE_JPEG_VALUE)
 public class ImageController {
 
     private static final Logger log = LoggerFactory.getLogger(ImageController.class);