Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/spring/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/spring-mvc/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring 运行服务器时出现Jhipster错误_Spring_Spring Mvc - Fatal编程技术网

Spring 运行服务器时出现Jhipster错误

Spring 运行服务器时出现Jhipster错误,spring,spring-mvc,Spring,Spring Mvc,我在h2数据库中使用jhipster-4.5.1,在更改代码后运行服务器时出错,但代码中没有错误,只有在代码修改时运行服务器时出错 2017-06-14 17:43:03.578 WARN 19964 --- [ restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: o

我在h2数据库中使用jhipster-4.5.1,在更改代码后运行服务器时出错,但代码中没有错误,只有在代码修改时运行服务器时出错

2017-06-14 17:43:03.578  WARN 19964 --- [  restartedMain] ationConfigEmbeddedWebApplicationContext : Exception encountered during context initialization - cancelling refresh attempt: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bloodPressureResource' defined in file [/home/rajeev/Devapp_Maven/target/classes/com/devapp/web/rest/BloodPressureResource.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bloodPressureRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Validation failed for query for method public abstract java.util.List com.devapp.repository.BloodPressureRepository.findAllByTimestampBetweenOrderByTimestampDesc(java.time.LocalDate,java.time.LocalDate)!
2017-06-14 17:43:03.916 DEBUG 19964 --- [  restartedMain] c.e.c.Ehcache-com.devapp.domain.Points   : Close successful.
2017-06-14 17:43:03.919 DEBUG 19964 --- [  restartedMain] c.e.c.Ehcache-com.devapp.domain.Weight   : Close successful.
2017-06-14 17:43:03.921 DEBUG 19964 --- [  restartedMain] c.e.c.E.devapp.domain.BloodPressure      : Close successful.
2017-06-14 17:43:03.923 DEBUG 19964 --- [  restartedMain] c.e.c.E.devapp.domain.Preferences        : Close successful.
2017-06-14 17:43:03.925 DEBUG 19964 --- [  restartedMain] c.e.c.E.devapp.domain.Authority          : Close successful.
2017-06-14 17:43:03.930 DEBUG 19964 --- [  restartedMain] c.e.core.Ehcache-com.devapp.domain.User  : Close successful.
2017-06-14 17:43:03.932 DEBUG 19964 --- [  restartedMain] c.e.c.E.devapp.domain.User.authorities   : Close successful.
2017-06-14 17:43:03.994  WARN 19964 --- [  restartedMain] o.s.boot.SpringApplication               : Error handling failed (Error creating bean with name 'delegatingApplicationListener' defined in class path resource [org/springframework/security/config/annotation/web/configuration/WebSecurityConfiguration.class]: BeanPostProcessor before instantiation of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'org.springframework.cache.config.internalCacheAdvisor' defined in class path resource [org/springframework/cache/annotation/ProxyCachingConfiguration.class]: Bean instantiation via factory method failed; nested exception is org.springframework.beans.BeanInstantiationException: Failed to instantiate [org.springframework.cache.interceptor.BeanFactoryCacheOperationSourceAdvisor]: Factory method 'cacheAdvisor' threw exception; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'cacheAutoConfigurationValidator' defined in class path resource [org/springframework/boot/autoconfigure/cache/CacheAutoConfiguration.class]: Initialization of bean failed; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'spring.cache-org.springframework.boot.autoconfigure.cache.CacheProperties': Initialization of bean failed; nested exception is java.lang.IllegalStateException: org.springframework.boot.context.embedded.AnnotationConfigEmbeddedWebApplicationContext@60ee6558 has not been refreshed yet)
2017-06-14 17:43:04.016 ERROR 19964 --- [  restartedMain] o.s.boot.SpringApplication               : Application startup failed

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'bloodPressureResource' defined in file [/home/rajeev/Devapp_Maven/target/classes/com/devapp/web/rest/BloodPressureResource.class]: Unsatisfied dependency expressed through constructor parameter 0; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'bloodPressureRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Validation failed for query for method public abstract java.util.List com.devapp.repository.BloodPressureRepository.findAllByTimestampBetweenOrderByTimestampDesc(java.time.LocalDate,java.time.LocalDate)!
提前感谢

您的查询FindAllByTimesTampBetween NorderByTimesTampdesc在血压预测中无效

至少在那个错误中是这样说的:


查询方法public abstract java.util.List com.devapp.repository.BloodPressureRepository.findAllByTimestampBetweenOrderByTimestampDescjava.time.LocalDate、java.time.LocalDate时验证失败

请格式化代码,提取错误并尝试精确描述您的问题。我应该如何更改它,而不获取任何其他方法?以及如何修改查询--@Queryselect blood_pressure from blood_pressure blood_pressure where blood_pressure.manytoone.login=?{principal.username}按血压排序。日期描述代码--公共界面血压存储扩展JpaRepository{/@Queryselect*from blood pressure@Queryselect blood\u pressure from blood\u pressure blood\u pressure其中blood\u pressure.manytone.login=?{principal.username}按血压排序。日期描述列出FindAllByTimesTampBeween和UserLoginNorderByTimesTampDescLocalDate firstDate,LocalDate secondDate;列出FindAllByTimesTampBeween和UserLoginNorderByTimesTampDescLocalDaysAgo,LocalDate rightNow,String login;}如果你想将正确格式化的代码添加到你的问题中,有人可能会帮助你。我从未使用过@Query语法?{principal.userName},但可能它不知道如何找到主体。也许您需要将其添加到参数中,并指定@Paramprincipal?我刚刚使用{principal.emailAddress}找到的。。所以这可能也行。也许你需要更新你的问题。