-
500错误
org.springframework.web.util.NestedServletException: Request processing failed; nested exception is java.lang.NullPointerException
暂时没明白,可能跟dubbo中间件有关,重启下服务器就好了
-
400错误
The server cannot or will not process the request due to something that is perceived to be a client error
参数类型问题,在传参过程中,后台接收的代码是
@RequestBody TbBrand brand
而前端传递的是空值。
-
前端js中发送post请求后无法调用success方法,原因:js的Service中定义了方法没有返回值(没有return);
-
配置Spring Security后启动tomcat一直失败,两个原因,第一:xml文件中配置登录页面时前面少了“/”。第二,web.xml配置文件中过滤器的名称一定要为springSecurityFilterChain。
-
Spring Security配置form-login标签时,最好把username-parameter和password-parameter都指定一下
-
重大bug:idea里改完js文件后先保存下(其他文件也一样把),否则可能会没有更新。
-
在dubbo框架中,通过配置的方式注入远程的bean。主要为了解决在Web层配置Spring Security时,在自定义认证类中需要用到Service,但使用@Reference注解无法注入,采用配置的方式,在Security的xml配置文件中先引用dubbo服务
<dubbo:application name=“pinyougou-shop-web”/>
<dubbo:registry address=“zookeeper://192.168.200.131:2181”/>然后配置远程的Service
<dubbo:reference interface=“com.pinyougou.sellergoods.service.SellerService” id=“sellerService”></dubbo:reference>
最后使用set方式注入
< bean id=“userDetailsService” class=“com.pinyougou.shop.service.UserDetailsServiceImpl”>
< property name=“sellerService” ref=“sellerService”></ property>
</ bean>
电商项目遇到的问题
最新推荐文章于 2022-07-31 19:09:49 发布