add HiddenHttpMethodFilter in WmsApplication

This commit is contained in:
Kana
2024-01-03 16:58:03 +09:00
parent dac2f36cea
commit 066ec4a711
2 changed files with 9 additions and 3 deletions

View File

@@ -3,6 +3,8 @@ package com.no1.wms;
import org.mybatis.spring.annotation.MapperScan; import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.filter.HiddenHttpMethodFilter;
@SpringBootApplication @SpringBootApplication
public class WmsApplication { public class WmsApplication {
@@ -10,7 +12,10 @@ public class WmsApplication {
public static void main(String[] args) { public static void main(String[] args) {
SpringApplication.run(WmsApplication.class, args); SpringApplication.run(WmsApplication.class, args);
} }
@Bean
public HiddenHttpMethodFilter hiddenHttpMethodFilter(){
return new HiddenHttpMethodFilter();
}
} }

View File

@@ -8,6 +8,7 @@ import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping; import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RequestParam;
@Controller @Controller
@@ -74,7 +75,7 @@ public class CategoryController {
} }
// 수정 - Ajax // 수정 - Ajax
@PostMapping("/category//update_process") @PutMapping("/category//update_process")
public int updateProcess(CategoryDto dto, Model m) { public int updateProcess(CategoryDto dto, Model m) {
int i = categoryService.createProcess(dto); int i = categoryService.createProcess(dto);
@@ -87,7 +88,7 @@ public class CategoryController {
} }
} }
// 삭제