eclipseeclipse中使用maven将springboot项目打成war包 1.pom.xml里指定为war <packaging>war</packaging> 2.WebApplication.java里加上以下代码 @Override prote... 2018年9月28日 浏览量:1,185 次 发表评论 阅读全文
SpringBoot里获取出错项目的项目名和错误消息 List err = result.getFieldErrors(); FieldError fe; String field; String errorMessage; for (int i = 0... 2018年8月31日 SpringBoot 浏览量:598 次 发表评论 阅读全文
SpringBoot自定义check注解 @Target({ ElementType.TYPE, ElementType.FIELD }) @Retention(RetentionPolicy.RUNTIME) @Constraint(val... 2018年8月29日 SpringBoot 浏览量:858 次 发表评论 阅读全文
SpringBoot里多个url对应一个方法 写法如下: @RequestMapping(value = { "{prodNo}/detail", "{prodNo}/{stationNo}/detail" }) public ModelAndV... 2018年8月23日 SpringBoot 浏览量:1,195 次 发表评论 阅读全文
SpringBoot以form形式接受单值 controller里: @PostMapping("{prodNo}/edit") @RequestMapping(value = "/{prodNo}/edit", method = { Requ... 2018年8月21日 SpringBoot 浏览量:733 次 发表评论 阅读全文
SpringBoot form submit时后台接受不到值 今天项目中发现form submit时后台接受不到值,看了下工程里的代码发现,共通里自定义了一个@BindField注解,加上这个注解后值就能正常接受了,但是印象中Spring是可以自动接受值的,看了... 2018年8月9日 SpringBoot 浏览量:933 次 发表评论 阅读全文
SpringBoot conflicts with existing, non-compatible bean definition of same name and class 的解决办法 Caused by: org.springframework.context.annotation.ConflictingBeanDefinitionException: Annotation-spe... 2018年8月8日 SpringBoot 浏览量:5,433 次 发表评论 阅读全文
SpringBoot ajax get和post方法总结 1. GET请求会将参数跟在URL后进行传递, 例如: data : {id :1,name:"gaa"}, 会以/search?id=1&&name=aa的形式传递给后台。 而POS... 2018年8月6日 ajax 浏览量:1,412 次 发表评论 阅读全文
SpringBoot中常用注解@ PathVaribale / @ RequestParam controller里接受参数介绍 注解的作用为: @PathVaribale获取url中的数据 @RequestParam获取请求参数的值 (更多…) 2018年8月6日 SpringBoot 浏览量:1,798 次 发表评论 阅读全文