![](https://img-blog.csdnimg.cn/20201014180756738.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring MVC
Eight_zhu
认真的做一件事。
展开
-
Spring错误:java.lang.IllegalStateException: Failed to load ApplicationContext
转自: https://blog.csdn.net/wzhedward/article/details/788724371、使用gradle创建项目后,测试@Test注解方式创建的切面出现以下错误:java.lang.IllegalStateException: Failed to load ApplicationContext at org.springframework.te...转载 2018-09-12 15:00:09 · 825 阅读 · 0 评论 -
SpringMVC BindingResult验证框架Validation用法
转自:https://blog.csdn.net/clypm/article/details/69382766使用注解一、准备校验时使用的JARvalidation-api-1.0.0.GA.jar:JDK的接口;hibernate-validator-4.2.0.Final.jar是对上述接口的实现;log4j、slf4j、slf4j-log4j 二、编写需要校验的b...转载 2018-09-10 13:47:16 · 248 阅读 · 0 评论 -
注解 @Resource 【转】
在java代码中使用@Autowired或@Resource注解方式进行装配,这两个注解的区别是:@Autowired默认按类型装配,@Resource默认按名称装配,当找不到与名称匹配的bean才会按类型装配。 @Autowired privatePersonDao personDao;//用于字段上 @Autowired public voidsetOrderDa...转载 2018-10-17 14:32:40 · 691 阅读 · 0 评论 -
@ResponseBody使用
1、使用@ResponseBody,则表明从后台返回前端数据例子:前端需要后台返回字符串去判断是否成功。PubConstants.SUCCESS=“success”@RequestMapping("/delete") @ResponseBody public String delete(String id) { if (StringUtils.isEmpty(id)) { ...原创 2018-12-12 14:57:51 · 239 阅读 · 0 评论 -
Spring MVC 通过 @PropertySource和@Value 来读取配置文件
转自:https://blog.csdn.net/evilcry2012/article/details/84614137在这篇文章中,我们会利用Spring的@PropertySource和@Value两个注解从配置文件properties中读取值。先来段java代码@Component@PropertySource(value = {"classpath:common.proper...转载 2019-03-19 19:39:08 · 740 阅读 · 0 评论