title: Inferred type 'S' for type parameter 'S' is not within its bound; should extend 'ua.com.store.entity.Country
body: <p>I have a problem with my CountryServiceImpl,when I want realize method findOne in CountryServiceImpl it tells me "Inferred type 'S' for type parameter 'S' is not within its bound; should extend 'ua.com.store.entity.Country". </p>
  
  <p>I wanted to fix by myself, but I don't understand what this means.
  Could you please help me with this issue.</p>
  
  <p>Thank you.</p>
  
  <pre class="lang-java prettyprint-override"><code>@Entity
  @Getter
  @Setter
  @NoArgsConstructor
  @ToString
  public class Country {
  
      @Id
      @GeneratedValue(strategy = GenerationType.IDENTITY)
      private int id;
  
      private String countryName;
  
      @OneToMany(mappedBy = "country")
      private Set&lt;Brand&gt; brands = new HashSet&lt;Brand&gt;();
  }
  
  
  public interface CountryDAO extends JpaRepository&lt;Country, Integer&gt; {
  
      @Query("from Country c where c.countryName=:name")
      Country findByCountryName(@Param("name") String name);
  }
  
  
  public interface CountryService {
  
      void save(Country country);
      void delete(Country country);
      List&lt;Country&gt; findAll();
      Country findOne(int id);
      Country findByCountryName(String name);
  }
  
  
  @Service
  public class CountryServiceImpl implements CountryService {
  
      @Autowired
      private CountryDAO dao;
  
      @Override
      public void save(Country country) {
          dao.save(country);
      }
  
      @Override
      public void delete(Country country) {
          dao.delete(country);
      }
  
      @Override
      public List&lt;Country&gt; findAll() {
          return dao.findAll();
      }
  
      @Override
      public Country findOne(int id) {
          return dao.findOne(id);
      }
  
      @Override
      public Country findByCountryName(String name) {
          return dao.findByCountryName(name);
      }
  }
  </code></pre>