I am currently building an application with a REST interface, using Spring Boot, Hibernate and Spring-HATEOAS. My data model is defined as beans with @Entity
annota
Exclude Specific resource: To exclude only a specific Repository use the code below in the specific interface, the mapping in the Controller will still work.
@Repository
@RestResource(exported = false)
interface SongRepository : JpaRepository
Entirely: To exclude entirely, use the Kotlin version of the previous answers in the main class:
@SpringBootApplication
@EnableAutoConfiguration(exclude = arrayOf(RepositoryRestMvcAutoConfiguration::class))
class WebserviceApplication