title: Error creating bean with name 'userRepository' defined in com.user.Repository.UserRepository defined in @EnableJpaRepositories declared on JpaRe
body: <p><strong>Repository</strong>
  *As I am trying to enter details of user but i am getting bean Exception i don't what i have missed
  from repository interface i have implements JPA and i triad with crud as well . I dint mention any controller class yet</p>
  <pre><code>public interface UserRepository extends JpaRepository&lt;User,Long&gt; {
  
      public User findByName(String username);
  }
  </code></pre>
  <p><strong>UserModel</strong></p>
  <pre><code>@Entity
  @Table(name = &quot;users&quot;)
  public class User {
      @Id
      @GeneratedValue(strategy = GenerationType.AUTO)
      private Long id;
      private String username;
      private String email;
      private Date DOB;
      private String Address;
  
      public User() {
      }
  
      public User(Long id, String username, String email, Date DOB, String address) {
          this.id = id;
          this.username = username;
          this.email = email;
          this.DOB = DOB;
          Address = address;
      }
  
      public Long getId() {
          return id;
      }
  
      public void setId(Long id) {
          this.id = id;
      }
  
      public String getUsername() {
          return username;
      }
  
      public void setUsername(String username) {
          this.username = username;
      }
  
      public String getEmail() {
          return email;
      }
  
      public void setEmail(String email) {
          this.email = email;
      }
  
      public Date getDOB() {
          return DOB;
      }
  
      public void setDOB(Date DOB) {
          this.DOB = DOB;
      }
  
      public String getAddress() {
          return Address;
      }
  
      public void setAddress(String address) {
          Address = address;
      }
  }
  </code></pre>
  <p><strong>UserService</strong>
  <em>Userservice i have given</em></p>
  <pre><code>public interface UserService {
  
      //Creating User
      public User CreateUser(User user) throws Exception;
  }
  </code></pre>
  <p><strong>ServiceImp</strong></p>
  <pre><code>public class UserServiceImp implements UserService {
  
      @Autowired
      private UserRepository userData;
  
      //Creating user
      @Override
      public User CreateUser(User user) throws Exception {
          User local=this.userData.findByName(user.getUsername());
          if(local!=null)
          {
              System.out.println(&quot;User is already present!!&quot;);
              throw new Exception(&quot;User is already there&quot;);
          }
          else {
              local=this.userData.save(user);
          }
          return local;
      }
  }
  </code></pre>
  <p><strong>Main Class</strong>
  This is the main class</p>
  <pre><code>@SpringBootApplication
  public class UserInformationApplication implements CommandLineRunner {
  
      public static void main(String[] args) {
  
          SpringApplication.run(UserInformationApplication.class, args);
      }
  
      @Override
      public void run(String... args) throws Exception {
          System.out.println(&quot;starting Application&quot;);
      }
  }
  </code></pre>