Ola alguémpoderia me dar uma força aqui? Estou com este erro,
2022-05-27 15:51:49.927 INFO 7568 --- [ main] ConditionEvaluationReportLoggingListener :
Error starting ApplicationContext. To display the conditions report re-run your application with 'debug' enabled.
2022-05-27 15:51:49.951 ERROR 7568 --- [ main] o.s.b.d.LoggingFailureAnalysisReporter :
***************************
APPLICATION FAILED TO START
***************************
Description:
Parameter 1 of constructor in br.com.alura.spring.data.SpringDataApplication required a bean of type 'br.com.alura.spring.data.service.CrudUnidadeService' that could not be found.
Action:
Consider defining a bean of type 'br.com.alura.spring.data.service.CrudUnidadeService' in your configuration.
Minha Classe Funcionarios esta assim:
package br.com.alura.spring.data.orm;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;
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.JoinTable;
import javax.persistence.ManyToMany;
import javax.persistence.ManyToOne;
import javax.persistence.Table;
import org.hibernate.annotations.Fetch;
import org.hibernate.annotations.FetchMode;
@Entity
@Table(name = "funcionarios")
public class Funcionarios {
@Id
@GeneratedValue(strategy = GenerationType.IDENTITY)
private Integer id;
private String nome;
private String cpf;
private BigDecimal salario;
private LocalDate dataContratacao;
@ManyToOne
@JoinColumn(name = "cargo_id", nullable = false)
private Cargo cargo;
@Fetch(FetchMode.SELECT)
@ManyToMany(fetch = FetchType.EAGER)
@JoinTable(name = "funcionarios_unidades",
joinColumns = { @JoinColumn(name = "fk_funcionario") },
inverseJoinColumns = { @JoinColumn(name = "fk_unidade") })
private List<Unidade> unidadeTrabalhos;
@Override
public String toString() {
return "Funcionarios [id=" + id + ", nome=" + nome + ", cpf=" + cpf + ", salario=" + salario
+ ", dataContratacao=" + dataContratacao + ", cargo=" + cargo + "]";
}
public Funcionarios() {
}
public Funcionarios(String nome, String cpf, BigDecimal salario, LocalDate dataContratacao) {
this.nome = nome;
this.cpf = cpf;
this.salario = salario;
this.dataContratacao = dataContratacao;
}
public Funcionarios(Integer id, String nome, String cpf, BigDecimal salario, LocalDate dataContratacao) {
this.id = id;
this.nome = nome;
this.cpf = cpf;
this.salario = salario;
this.dataContratacao = dataContratacao;
}
public Integer getId() {
return id;
}
public String getNome() {
return nome;
}
public String getCpf() {
return cpf;
}
public BigDecimal getSalario() {
return salario;
}
public LocalDate getDataContratacao() {
return dataContratacao;
}
}