Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/335.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
Java 未满足的依赖项异常(Springboot)_Java_Spring Boot_Rest_Spring Data Jpa_Sts - Fatal编程技术网

Java 未满足的依赖项异常(Springboot)

Java 未满足的依赖项异常(Springboot),java,spring-boot,rest,spring-data-jpa,sts,Java,Spring Boot,Rest,Spring Data Jpa,Sts,我有两个表,结构如下: 课程: |课程id |课程名称| 模块 |模块| id |持续时间|模块|名称|模块|类型|课程|课程| id| 现在我想根据课程id提取模块: 在SQL中,查询如下所示: Select * from modules where course_id = ? 此课程id将使用API通过参数传递。 我用JPA检索了这个。但每次运行sts时都会出现一个不满意的依赖项错误 模块: package com.scb.axess.playbook.model; import jav

我有两个表,结构如下: 课程: |课程id |课程名称| 模块 |模块| id |持续时间|模块|名称|模块|类型|课程|课程| id|

现在我想根据课程id提取模块: 在SQL中,查询如下所示:

Select * from modules where course_id = ?
此课程id将使用API通过参数传递。 我用JPA检索了这个。但每次运行sts时都会出现一个不满意的依赖项错误

模块:

package com.scb.axess.playbook.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table (name = "moduless")
public class Module {
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    @Column(name = "module_id")
    Integer module_id;
    @Column(name = "module_type")
    String module_type;
    @Column(name = "module_name")
    String module_name;
    @Column(name = "duration")
    Integer duration;
    @OneToOne( cascade = CascadeType.ALL)
    private Course course;
    
    public Integer getModule_id() {
        return module_id;
    }

    public void setModule_id(Integer module_id) {
        this.module_id = module_id;
    }

    public String getModule_type() {
        return module_type;
    }

    public void setModule_type(String module_type) {
        this.module_type = module_type;
    }

    public String getModule_name() {
        return module_name;
    }

    public void setModule_name(String module_name) {
        this.module_name = module_name;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Course getCourse() {
        return course;
    }

    public void setCourse(Course course) {
        this.course = course;
    }
    
}
package com.scb.axess.playbook.model;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
@Entity
@Table (name = "courses")
public class Course {
    @Id
    @Column(name = "id")
    Integer course_id;
    @Column(name = "course_name")
    String course_name;

    public Integer getCourse_id() {
        return course_id;
    }
    public void setCourse_id(Integer course_id) {
        this.course_id = course_id;
    }
    public String getCourse_name() {
        return course_name;
    }
    public void setCourse_name(String course_name) {
        this.course_name = course_name;
    }
}
package com.scb.axess.playbook.repository;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;

import com.scb.axess.playbook.model.Module;

public interface ModuleRepository extends JpaRepository<Module, Integer>{
    public List<Module> findByCourseId(int course_course_id);
}
package com.scb.axess.playbook.service;
import java.util.List;
import java.util.Optional;

import com.scb.axess.playbook.model.Module;


public interface IModuleService {
     public List<Module> getModulesByCourseId(Integer course_course_id);
}
package com.scb.axess.playbook.serviceimpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.scb.axess.playbook.model.Module;
import com.scb.axess.playbook.repository.ModuleRepository;
import com.scb.axess.playbook.service.IModuleService;

@Service
public class ModuleService implements IModuleService{
    @Autowired
    ModuleRepository moduleRepo;

    @Override
    public List<Module> getModulesByCourseId(Integer course_course_id) {
        // TODO Auto-generated method stub
        return moduleRepo.findByCourseId(course_course_id);
    }
课程:

package com.scb.axess.playbook.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table (name = "moduless")
public class Module {
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    @Column(name = "module_id")
    Integer module_id;
    @Column(name = "module_type")
    String module_type;
    @Column(name = "module_name")
    String module_name;
    @Column(name = "duration")
    Integer duration;
    @OneToOne( cascade = CascadeType.ALL)
    private Course course;
    
    public Integer getModule_id() {
        return module_id;
    }

    public void setModule_id(Integer module_id) {
        this.module_id = module_id;
    }

    public String getModule_type() {
        return module_type;
    }

    public void setModule_type(String module_type) {
        this.module_type = module_type;
    }

    public String getModule_name() {
        return module_name;
    }

    public void setModule_name(String module_name) {
        this.module_name = module_name;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Course getCourse() {
        return course;
    }

    public void setCourse(Course course) {
        this.course = course;
    }
    
}
package com.scb.axess.playbook.model;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
@Entity
@Table (name = "courses")
public class Course {
    @Id
    @Column(name = "id")
    Integer course_id;
    @Column(name = "course_name")
    String course_name;

    public Integer getCourse_id() {
        return course_id;
    }
    public void setCourse_id(Integer course_id) {
        this.course_id = course_id;
    }
    public String getCourse_name() {
        return course_name;
    }
    public void setCourse_name(String course_name) {
        this.course_name = course_name;
    }
}
package com.scb.axess.playbook.repository;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;

import com.scb.axess.playbook.model.Module;

public interface ModuleRepository extends JpaRepository<Module, Integer>{
    public List<Module> findByCourseId(int course_course_id);
}
package com.scb.axess.playbook.service;
import java.util.List;
import java.util.Optional;

import com.scb.axess.playbook.model.Module;


public interface IModuleService {
     public List<Module> getModulesByCourseId(Integer course_course_id);
}
package com.scb.axess.playbook.serviceimpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.scb.axess.playbook.model.Module;
import com.scb.axess.playbook.repository.ModuleRepository;
import com.scb.axess.playbook.service.IModuleService;

@Service
public class ModuleService implements IModuleService{
    @Autowired
    ModuleRepository moduleRepo;

    @Override
    public List<Module> getModulesByCourseId(Integer course_course_id) {
        // TODO Auto-generated method stub
        return moduleRepo.findByCourseId(course_course_id);
    }
模块存储库:

package com.scb.axess.playbook.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table (name = "moduless")
public class Module {
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    @Column(name = "module_id")
    Integer module_id;
    @Column(name = "module_type")
    String module_type;
    @Column(name = "module_name")
    String module_name;
    @Column(name = "duration")
    Integer duration;
    @OneToOne( cascade = CascadeType.ALL)
    private Course course;
    
    public Integer getModule_id() {
        return module_id;
    }

    public void setModule_id(Integer module_id) {
        this.module_id = module_id;
    }

    public String getModule_type() {
        return module_type;
    }

    public void setModule_type(String module_type) {
        this.module_type = module_type;
    }

    public String getModule_name() {
        return module_name;
    }

    public void setModule_name(String module_name) {
        this.module_name = module_name;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Course getCourse() {
        return course;
    }

    public void setCourse(Course course) {
        this.course = course;
    }
    
}
package com.scb.axess.playbook.model;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
@Entity
@Table (name = "courses")
public class Course {
    @Id
    @Column(name = "id")
    Integer course_id;
    @Column(name = "course_name")
    String course_name;

    public Integer getCourse_id() {
        return course_id;
    }
    public void setCourse_id(Integer course_id) {
        this.course_id = course_id;
    }
    public String getCourse_name() {
        return course_name;
    }
    public void setCourse_name(String course_name) {
        this.course_name = course_name;
    }
}
package com.scb.axess.playbook.repository;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;

import com.scb.axess.playbook.model.Module;

public interface ModuleRepository extends JpaRepository<Module, Integer>{
    public List<Module> findByCourseId(int course_course_id);
}
package com.scb.axess.playbook.service;
import java.util.List;
import java.util.Optional;

import com.scb.axess.playbook.model.Module;


public interface IModuleService {
     public List<Module> getModulesByCourseId(Integer course_course_id);
}
package com.scb.axess.playbook.serviceimpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.scb.axess.playbook.model.Module;
import com.scb.axess.playbook.repository.ModuleRepository;
import com.scb.axess.playbook.service.IModuleService;

@Service
public class ModuleService implements IModuleService{
    @Autowired
    ModuleRepository moduleRepo;

    @Override
    public List<Module> getModulesByCourseId(Integer course_course_id) {
        // TODO Auto-generated method stub
        return moduleRepo.findByCourseId(course_course_id);
    }
package com.scb.axess.playbook.repository;
导入java.util.List;
导入java.util.Optional;
导入org.springframework.data.jpa.repository.JpaRepository;
导入org.springframework.data.repository.crudepository;
导入com.scb.axess.playbook.model.Module;
公共接口模块Repository扩展了JpaRepository{
公共列表findByCourseId(int-course\u-course\u-id);
}
iModule服务:

package com.scb.axess.playbook.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table (name = "moduless")
public class Module {
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    @Column(name = "module_id")
    Integer module_id;
    @Column(name = "module_type")
    String module_type;
    @Column(name = "module_name")
    String module_name;
    @Column(name = "duration")
    Integer duration;
    @OneToOne( cascade = CascadeType.ALL)
    private Course course;
    
    public Integer getModule_id() {
        return module_id;
    }

    public void setModule_id(Integer module_id) {
        this.module_id = module_id;
    }

    public String getModule_type() {
        return module_type;
    }

    public void setModule_type(String module_type) {
        this.module_type = module_type;
    }

    public String getModule_name() {
        return module_name;
    }

    public void setModule_name(String module_name) {
        this.module_name = module_name;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Course getCourse() {
        return course;
    }

    public void setCourse(Course course) {
        this.course = course;
    }
    
}
package com.scb.axess.playbook.model;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
@Entity
@Table (name = "courses")
public class Course {
    @Id
    @Column(name = "id")
    Integer course_id;
    @Column(name = "course_name")
    String course_name;

    public Integer getCourse_id() {
        return course_id;
    }
    public void setCourse_id(Integer course_id) {
        this.course_id = course_id;
    }
    public String getCourse_name() {
        return course_name;
    }
    public void setCourse_name(String course_name) {
        this.course_name = course_name;
    }
}
package com.scb.axess.playbook.repository;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;

import com.scb.axess.playbook.model.Module;

public interface ModuleRepository extends JpaRepository<Module, Integer>{
    public List<Module> findByCourseId(int course_course_id);
}
package com.scb.axess.playbook.service;
import java.util.List;
import java.util.Optional;

import com.scb.axess.playbook.model.Module;


public interface IModuleService {
     public List<Module> getModulesByCourseId(Integer course_course_id);
}
package com.scb.axess.playbook.serviceimpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.scb.axess.playbook.model.Module;
import com.scb.axess.playbook.repository.ModuleRepository;
import com.scb.axess.playbook.service.IModuleService;

@Service
public class ModuleService implements IModuleService{
    @Autowired
    ModuleRepository moduleRepo;

    @Override
    public List<Module> getModulesByCourseId(Integer course_course_id) {
        // TODO Auto-generated method stub
        return moduleRepo.findByCourseId(course_course_id);
    }
package com.scb.axess.playbook.service;
导入java.util.List;
导入java.util.Optional;
导入com.scb.axess.playbook.model.Module;
公共接口服务{
公共列表getModulesByCourseId(整数课程id);
}
ModuleServiceImpl:

package com.scb.axess.playbook.model;

import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
import javax.persistence.Table;

@Entity
@Table (name = "moduless")
public class Module {
    @Id
    @GeneratedValue(strategy = GenerationType.SEQUENCE)
    @Column(name = "module_id")
    Integer module_id;
    @Column(name = "module_type")
    String module_type;
    @Column(name = "module_name")
    String module_name;
    @Column(name = "duration")
    Integer duration;
    @OneToOne( cascade = CascadeType.ALL)
    private Course course;
    
    public Integer getModule_id() {
        return module_id;
    }

    public void setModule_id(Integer module_id) {
        this.module_id = module_id;
    }

    public String getModule_type() {
        return module_type;
    }

    public void setModule_type(String module_type) {
        this.module_type = module_type;
    }

    public String getModule_name() {
        return module_name;
    }

    public void setModule_name(String module_name) {
        this.module_name = module_name;
    }

    public Integer getDuration() {
        return duration;
    }

    public void setDuration(Integer duration) {
        this.duration = duration;
    }

    public Course getCourse() {
        return course;
    }

    public void setCourse(Course course) {
        this.course = course;
    }
    
}
package com.scb.axess.playbook.model;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.CascadeType;
import javax.persistence.Column;
import javax.persistence.Table;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToMany;
import javax.persistence.OneToOne;
@Entity
@Table (name = "courses")
public class Course {
    @Id
    @Column(name = "id")
    Integer course_id;
    @Column(name = "course_name")
    String course_name;

    public Integer getCourse_id() {
        return course_id;
    }
    public void setCourse_id(Integer course_id) {
        this.course_id = course_id;
    }
    public String getCourse_name() {
        return course_name;
    }
    public void setCourse_name(String course_name) {
        this.course_name = course_name;
    }
}
package com.scb.axess.playbook.repository;
import java.util.List;
import java.util.Optional;
import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.repository.CrudRepository;

import com.scb.axess.playbook.model.Module;

public interface ModuleRepository extends JpaRepository<Module, Integer>{
    public List<Module> findByCourseId(int course_course_id);
}
package com.scb.axess.playbook.service;
import java.util.List;
import java.util.Optional;

import com.scb.axess.playbook.model.Module;


public interface IModuleService {
     public List<Module> getModulesByCourseId(Integer course_course_id);
}
package com.scb.axess.playbook.serviceimpl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.scb.axess.playbook.model.Module;
import com.scb.axess.playbook.repository.ModuleRepository;
import com.scb.axess.playbook.service.IModuleService;

@Service
public class ModuleService implements IModuleService{
    @Autowired
    ModuleRepository moduleRepo;

    @Override
    public List<Module> getModulesByCourseId(Integer course_course_id) {
        // TODO Auto-generated method stub
        return moduleRepo.findByCourseId(course_course_id);
    }
package com.scb.axess.playbook.serviceinpl;
导入java.util.List;
导入org.springframework.beans.factory.annotation.Autowired;
导入org.springframework.stereotype.Service;
导入com.scb.axess.playbook.model.Module;
导入com.scb.axess.playbook.repository.ModuleRepository;
导入com.scb.axess.playbook.service.IModuleService;
@服务
公共类ModuleService实现IModuleService{
@自动连线
模块还原模块EPO;
@凌驾
公共列表getModulesByCourseId(整型课程\u课程\u id){
//TODO自动生成的方法存根
返回模块epo.findByCourseId(课程号);
}
我收到一个不满意的依赖项注入错误。请帮助我并让我知道哪里出了问题。 提前感谢:)

错误: 启动ApplicationContext时出错。若要显示条件报告,请在启用“调试”的情况下重新运行应用程序。 2021-01-01 18:28:16.078错误11240---[restartedMain]o.s.boot.SpringApplication:应用程序运行失败

org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'moduleController': Unsatisfied dependency expressed through field 'moduleRepo'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'moduleRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.scb.axess.playbook.repository.ModuleRepository.findByCourseId(int)! No property id found for type Course! Traversed path: Module.course.
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:596) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1395) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.preInstantiateSingletons(DefaultListableBeanFactory.java:849) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549) ~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142) ~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:316) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1260) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at org.springframework.boot.SpringApplication.run(SpringApplication.java:1248) [spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
    at com.scb.axess.playbook.PlaybookApplication.main(PlaybookApplication.java:10) [classes/:na]
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[na:1.8.0_151]
    at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_151]
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source) ~[na:1.8.0_151]
    at java.lang.reflect.Method.invoke(Unknown Source) ~[na:1.8.0_151]
    at org.springframework.boot.devtools.restart.RestartLauncher.run(RestartLauncher.java:49) [spring-boot-devtools-2.1.3.RELEASE.jar:2.1.3.RELEASE]
Caused by: org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'moduleRepository': Invocation of init method failed; nested exception is java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.scb.axess.playbook.repository.ModuleRepository.findByCourseId(int)! No property id found for type Course! Traversed path: Module.course.
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1762) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:593) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.config.DependencyDescriptor.resolveCandidate(DependencyDescriptor.java:277) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.doResolveDependency(DefaultListableBeanFactory.java:1247) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.DefaultListableBeanFactory.resolveDependency(DefaultListableBeanFactory.java:1167) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor$AutowiredFieldElement.inject(AutowiredAnnotationBeanPostProcessor.java:593) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    ... 24 common frames omitted
Caused by: java.lang.IllegalArgumentException: Failed to create query for method public abstract java.util.List com.scb.axess.playbook.repository.ModuleRepository.findByCourseId(int)! No property id found for type Course! Traversed path: Module.course.
    at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.<init>(PartTreeJpaQuery.java:82) ~[spring-data-jpa-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:103) ~[spring-data-jpa-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$CreateIfNotFoundQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:208) ~[spring-data-jpa-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.jpa.repository.query.JpaQueryLookupStrategy$AbstractQueryLookupStrategy.resolveQuery(JpaQueryLookupStrategy.java:79) ~[spring-data-jpa-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lookupQuery(RepositoryFactorySupport.java:566) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$mapMethodsToQuery$1(RepositoryFactorySupport.java:559) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[na:1.8.0_151]
    at java.util.Iterator.forEachRemaining(Unknown Source) ~[na:1.8.0_151]
    at java.util.Collections$UnmodifiableCollection$1.forEachRemaining(Unknown Source) ~[na:1.8.0_151]
    at java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[na:1.8.0_151]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.mapMethodsToQuery(RepositoryFactorySupport.java:561) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.lambda$new$0(RepositoryFactorySupport.java:551) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at java.util.Optional.map(Unknown Source) ~[na:1.8.0_151]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport$QueryExecutorMethodInterceptor.<init>(RepositoryFactorySupport.java:551) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactorySupport.getRepository(RepositoryFactorySupport.java:324) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.lambda$afterPropertiesSet$5(RepositoryFactoryBeanSupport.java:297) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.util.Lazy.getNullable(Lazy.java:211) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.util.Lazy.get(Lazy.java:94) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.repository.core.support.RepositoryFactoryBeanSupport.afterPropertiesSet(RepositoryFactoryBeanSupport.java:300) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.jpa.repository.support.JpaRepositoryFactoryBean.afterPropertiesSet(JpaRepositoryFactoryBean.java:119) ~[spring-data-jpa-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.invokeInitMethods(AbstractAutowireCapableBeanFactory.java:1821) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    at org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.initializeBean(AbstractAutowireCapableBeanFactory.java:1758) ~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
    ... 34 common frames omitted
Caused by: org.springframework.data.mapping.PropertyReferenceException: No property id found for type Course! Traversed path: Module.course.
    at org.springframework.data.mapping.PropertyPath.<init>(PropertyPath.java:94) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:382) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:358) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:392) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:416) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.mapping.PropertyPath.create(PropertyPath.java:358) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.mapping.PropertyPath.lambda$from$0(PropertyPath.java:311) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at java.util.concurrent.ConcurrentMap.computeIfAbsent(Unknown Source) ~[na:1.8.0_151]
    at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:293) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.mapping.PropertyPath.from(PropertyPath.java:276) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.repository.query.parser.Part.<init>(Part.java:81) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.repository.query.parser.PartTree$OrPart.lambda$new$0(PartTree.java:250) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[na:1.8.0_151]
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[na:1.8.0_151]
    at org.springframework.data.repository.query.parser.PartTree$OrPart.<init>(PartTree.java:251) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.repository.query.parser.PartTree$Predicate.lambda$new$0(PartTree.java:380) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at java.util.stream.ReferencePipeline$3$1.accept(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.ReferencePipeline$2$1.accept(Unknown Source) ~[na:1.8.0_151]
    at java.util.Spliterators$ArraySpliterator.forEachRemaining(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.AbstractPipeline.copyInto(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.AbstractPipeline.evaluate(Unknown Source) ~[na:1.8.0_151]
    at java.util.stream.ReferencePipeline.collect(Unknown Source) ~[na:1.8.0_151]
    at org.springframework.data.repository.query.parser.PartTree$Predicate.<init>(PartTree.java:381) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.repository.query.parser.PartTree.<init>(PartTree.java:96) ~[spring-data-commons-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    at org.springframework.data.jpa.repository.query.PartTreeJpaQuery.<init>(PartTreeJpaQuery.java:76) ~[spring-data-jpa-2.1.5.RELEASE.jar:2.1.5.RELEASE]
    ... 60 common frames omitted
org.springframework.beans.factory.unsatifiedDependencyException:创建名为“moduleController”的bean时出错:通过字段“moduleRepo”表示的未满足的依赖关系;嵌套异常为org.springframework.beans.factory.BeanCreationException:创建名为“moduleRepository”的bean时出错:调用init方法失败;nested异常为java.lang.IllegalArgumentException:未能为方法public abstract java.util.List com.scb.axess.playbook.repository.ModuleRepository.findByCourseId(int)创建查询!未找到类型课程的属性id!遍历路径:Module.Course。
在org.springframework.beans.factory.annotation.AutoWiredNotationBeanPostProcessor$AutoWiredFeldElement.inject(AutoWiredNotationBeanPostProcessor.java:596)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.beans.factory.annotation.InjectionMetadata.inject(InjectionMetadata.java:90)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.beans.factory.annotation.AutowiredAnnotationBeanPostProcessor.postProcessProperties(AutowiredAnnotationBeanPostProcessor.java:374)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.populateBean(AbstractAutowireCapableBeanFactory.java:1395)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.doCreateBean(AbstractAutowireCapableBeanFactory.java:592)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.beans.factory.support.AbstractAutowireCapableBeanFactory.createBean(AbstractAutowireCapableBeanFactory.java:515)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.beans.factory.support.AbstractBeanFactory.lambda$doGetBean$0(AbstractBeanFactory.java:320)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.beans.factory.support.DefaultSingletonBeanRegistry.getSingleton(DefaultSingletonBeanRegistry.java:222)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.beans.factory.support.AbstractBeanFactory.doGetBean(AbstractBeanFactory.java:318)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.beans.factory.support.AbstractBeanFactory.getBean(AbstractBeanFactory.java:199)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.beans.factory.support.DefaultListableBeanFactory.PreInstanceSingleton(DefaultListableBeanFactory.java:849)~[spring-beans-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.context.support.AbstractApplicationContext.finishBeanFactoryInitialization(AbstractApplicationContext.java:877)~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.context.support.AbstractApplicationContext.refresh(AbstractApplicationContext.java:549)~[spring-context-5.1.5.RELEASE.jar:5.1.5.RELEASE]
在org.springframework.boot.web.servlet.context.ServletWebServerApplicationContext.refresh(ServletWebServerApplicationContext.java:142)~[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
在org.springframework.boot.SpringApplication.refresh(SpringApplication.java:775)[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
位于org.springframework.boot.SpringApplication.refreshContext(SpringApplication.java:397)[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
在org.springframework.boot.SpringApplication.run(SpringApplication.java:316)[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE]
在org.springframework.boot.SpringApplication.run(SpringApplication.java:1260)[spring-boot-2.1.3.RELEASE.jar:2.1.3.RELEASE