当前位置:首页>财经>正文

springboot怎么加载mapper配置文件

2024-01-14 05:44:59 互联网 未知 财经

springboot怎么加载mapper配置文件?

springboot怎么加载mapper配置文件

  

1、要将$http中的Content-Type设置为application/x-www-form-urlencoded因为目前的浏览器只支持这种类型的跨域   

2、需要在Application同级目录下写一个配置类,在里面配置一个返回类型为WebMvcConfigurerAdapter的Bean,用registry.addMapping("/*")设置拦截的范围"/*"代表拦截所有请求。