bkielczewski / example-spring-boot-rest

33 stars 36 forks source link

Issue in code execution #2

Open Ashutoshjava opened 7 years ago

Ashutoshjava commented 7 years ago

Issue 1: In Application.java (Spring boot main class) we have to specify base packages in @ComponentScan. (Example: @ComponentScan( basePackages = "com.cb.soap.service.*") In the same class we also have to add following annotations: @EntityScan("com.cb.soap.service.domain") @EnableJpaRepositories("com.cb.soap.service.repository")

Issue 2: We have to migrate our validation constraints from service implementation class to its parent interface. Constraint are: @NotNull, @Valid, final Modified interface method will look like: User save( @NotNull @Valid final User user );