Class RestConfig

java.lang.Object
com.example.vehicletaxsystem.config.RestConfig
All Implemented Interfaces:
org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer

@Configuration public class RestConfig extends Object implements org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer
Class that establishes REST endpoint and entity exposure.
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configureRepositoryRestConfiguration(org.springframework.data.rest.core.config.RepositoryRestConfiguration config, org.springframework.web.servlet.config.annotation.CorsRegistry cors)
    Configuring exposure for various entities and HTTP request methods.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer

    configureConversionService, configureExceptionHandlerExceptionResolver, configureHttpMessageConverters, configureJacksonObjectMapper, configureValidatingRepositoryEventListener, customizeAuditableBeanWrapperFactory, customizeLinkCollector
  • Constructor Details

    • RestConfig

      public RestConfig()
  • Method Details

    • configureRepositoryRestConfiguration

      public void configureRepositoryRestConfiguration(org.springframework.data.rest.core.config.RepositoryRestConfiguration config, org.springframework.web.servlet.config.annotation.CorsRegistry cors)
      Configuring exposure for various entities and HTTP request methods. PUT and PATCH disabled across the board - using POST instead. DELETE disabled other than TaxBand and TaxRate - allowing for removal of both in instances of tax law changes.
      Specified by:
      configureRepositoryRestConfiguration in interface org.springframework.data.rest.webmvc.config.RepositoryRestConfigurer