小编Mou*_*hie的帖子

@Autowired没有在spring mvc中管理"自动连接依赖注入失败"

我试图将bean注入我的类ValiderBR

 @Service
 public class ValiderBR extends BusinessRule {
  @Autowired
    ILog logger;
...
}
Run Code Online (Sandbox Code Playgroud)

但我有一个由@Autowired注释引起的注入错误

22 mai 2013 14:44:02 org.apache.catalina.core.ApplicationContext log
GRAVE: StandardWrapper.Throwable
org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'validerBR': Injection   of autowired dependencies failed; nested exception is org.springframework.beans.factory.BeanCreationException: Could not autowire field: ma.co.services.log.ILog awb.businessrules.WorkflowIndividu.ValiderBR.logger; nested exception is org.springframework.beans.factory.NoSuchBeanDefinitionException: No qualifying bean of type [ma.co.services.log.ILog] found for dependency: expected at least 1 bean which qualifies as autowire candidate for this dependency. Dependency annotations: {@org.springframework.beans.factory.annotation.Autowired(required=true)}
at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessPropertyValues(AutowiredAnnotationBeanPostProcessor.java:288)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1122)
at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:522)
at …
Run Code Online (Sandbox Code Playgroud)

java spring spring-mvc spring-annotations

1
推荐指数
1
解决办法
2万
查看次数

JavaScript JQuery String Var在字段中显示

我正在使用JavaScript JQuery,当我尝试在字段中显示变量的内容时,它不起作用.有我的代码:

function editEvolution(pos, nature, desc, di) {
      $('#diE').val(di);
      $('#natureE').val(nature);
      $('#descE').val(desc);

      $('#BtnAddEditEvo').attr('value', "Update");
      $('#BtnAddEditEvo').attr('onclick', "doEditEvolution("+pos+")");

}
Run Code Online (Sandbox Code Playgroud)

提前感谢您的帮助.

字段的值$('#diE'),$('#natureE')$('#descE')不会改变,如果瓦尔性质,递减,都是字符串,但它的作品,如果它是一个数字

javascript jquery

0
推荐指数
1
解决办法
71
查看次数