If I have a interface that has a type parameter , and an implementation of that interface like so:
public interface BaseService<T> {
List<T> getAll();
Optional<T> findById(long id);
T save(T user);
void delete(long id);
}
@Service
public class UserService implements BaseService<User> {
Is it possible at all to do something like this?
class BaseThingController<T> {
@Autowired
private BaseService<T> service;
ATM it tells me a bean cannot be found with that, just wondering if theres a way to make this work