Created
July 3, 2014 18:04
-
-
Save odrotbohm/c5a931326d0408c3a0f2 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package foo; | |
@NoRepositoryBean | |
interface InternalRepository<T> extends Repository<T, Long> { | |
<S extends T> save(S entity); | |
} | |
package foo; | |
public interface PersonRepository extends InternalRepository<Person> { | |
List<Person> findByLastname(String lastname); | |
} | |
package foo; | |
class Service { | |
@Autowired PersonRepository repo; | |
} | |
package foo.web; | |
@Controller | |
class PersonController { | |
@Autowired PersonRepository repo; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment