Re:Generating a Java program with 90% less code
by Eduard on Wednesday December 04, 2019 @11:35AM
(#21703660)
Not true, and where the Spring Framework <strong>allows</strong> to use interfaces only (i.e. without having to write an implementing class) it's for neat reasons, e.g. autogenerating Spring Repositories.
[ Parent
| on HN ]
Re:Generating a Java program with 90% less code
by playworker on Wednesday December 04, 2019 @12:48PM
(#21704701)
I think the GP is referring to the use of interfaces with only one implementing class, rather than interfaces with no implementing class. i.e. you end up creating a UserProvider and UserProviderImpl for every service class you write.
OP is probably referring to the JDK Proxy support which is used by Spring and requires classes to implement at least one interface.