diff --git a/core/modules/rest/src/RequestHandler.php b/core/modules/rest/src/RequestHandler.php
index 012942c..83a4311 100644
--- a/core/modules/rest/src/RequestHandler.php
+++ b/core/modules/rest/src/RequestHandler.php
@@ -26,13 +26,6 @@
 class RequestHandler implements ContainerInjectionInterface {
 
   /**
-   * The resource configuration storage.
-   *
-   * @var \Drupal\Core\Entity\EntityStorageInterface
-   */
-  protected $resourceStorage;
-
-  /**
    * The config factory.
    *
    * @var \Drupal\Core\Config\ConfigFactoryInterface
@@ -49,15 +42,12 @@ class RequestHandler implements ContainerInjectionInterface {
   /**
    * Creates a new RequestHandler instance.
    *
-   * @param \Drupal\Core\Entity\EntityStorageInterface $entity_storage
-   *   The resource configuration storage.
    * @param \Drupal\Core\Config\ConfigFactoryInterface $config_factory
    *   The config factory.
    * @param \Symfony\Component\Serializer\SerializerInterface|\Symfony\Component\Serializer\Encoder\DecoderInterface $serializer
    *   The serializer.
    */
-  public function __construct(EntityStorageInterface $entity_storage, ConfigFactoryInterface $config_factory, SerializerInterface $serializer) {
-    $this->resourceStorage = $entity_storage;
+  public function __construct(ConfigFactoryInterface $config_factory, SerializerInterface $serializer) {
     $this->configFactory = $config_factory;
     $this->serializer = $serializer;
   }
@@ -67,7 +57,6 @@ public function __construct(EntityStorageInterface $entity_storage, ConfigFactor
    */
   public static function create(ContainerInterface $container) {
     return new static(
-      $container->get('entity_type.manager')->getStorage('rest_resource_config'),
       $container->get('config.factory'),
       $container->get('serializer')
     );
@@ -80,19 +69,17 @@ public static function create(ContainerInterface $container) {
    *   The route match.
    * @param \Symfony\Component\HttpFoundation\Request $request
    *   The HTTP request object.
+   * @param \Drupal\rest\RestResourceConfigInterface $_rest_resource_config
+   *   Rest resource csonfig ID.
    *
-   * @return \Symfony\Component\HttpFoundation\Response|\Drupal\rest\ResourceResponseInterface
+   * @return \Drupal\rest\ResourceResponseInterface|\Symfony\Component\HttpFoundation\Response
    *   The REST resource response.
    */
-  public function handle(RouteMatchInterface $route_match, Request $request) {
-    $resource_config_id = $route_match->getRouteObject()->getDefault('_rest_resource_config');
-    /** @var \Drupal\rest\RestResourceConfigInterface $resource_config */
-    $resource_config = $this->resourceStorage->load($resource_config_id);
-
-    $response = $this->delegateToRestResourcePlugin($route_match, $request, $resource_config->getResourcePlugin());
+  public function handle(RouteMatchInterface $route_match, Request $request, RestResourceConfigInterface $_rest_resource_config) {
+    $response = $this->delegateToRestResourcePlugin($route_match, $request, $_rest_resource_config->getResourcePlugin());
 
     if ($response instanceof CacheableResponseInterface) {
-      $response->addCacheableDependency($resource_config);
+      $response->addCacheableDependency($_rest_resource_config);
       // Add global rest settings config's cache tag, for BC flags.
       // @see \Drupal\rest\Plugin\rest\resource\EntityResource::permissions()
       // @see \Drupal\rest\EventSubscriber\RestConfigSubscriber
diff --git a/core/modules/rest/src/Routing/ResourceRoutes.php b/core/modules/rest/src/Routing/ResourceRoutes.php
index 5ba4c5d..f3e64bd 100644
--- a/core/modules/rest/src/Routing/ResourceRoutes.php
+++ b/core/modules/rest/src/Routing/ResourceRoutes.php
@@ -126,6 +126,11 @@ protected function getRoutesForResourceConfig(RestResourceConfigInterface $rest_
         }
         $route->setOption('_auth', $rest_resource_config->getAuthenticationProviders($method));
         $route->setDefault('_rest_resource_config', $rest_resource_config->id());
+        $route->setOption('parameters', $route->getOption('parameters') + [
+          '_rest_resource_config' => [
+            'type' => 'entity:' . $rest_resource_config->getEntityTypeId(),
+          ],
+        ]);
         $collection->add("rest.$name", $route);
       }
 
diff --git a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
index 3ad421c..a0256e4 100644
--- a/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
+++ b/core/modules/rest/tests/src/Kernel/RequestHandlerTest.php
@@ -42,12 +42,11 @@ class RequestHandlerTest extends KernelTestBase {
    */
   public function setUp() {
     parent::setUp();
-    $this->entityStorage = $this->prophesize(EntityStorageInterface::class);
     $config_factory = $this->prophesize(ConfigFactoryInterface::class);
     $config_factory->get('rest.settings')
       ->willReturn($this->prophesize(ImmutableConfig::class)->reveal());
     $serializer = $this->prophesize(SerializerInterface::class);
-    $this->requestHandler = new RequestHandler($this->entityStorage->reveal(), $config_factory->reveal(), $serializer->reveal());
+    $this->requestHandler = new RequestHandler($config_factory->reveal(), $serializer->reveal());
   }
 
   /**
@@ -67,18 +66,17 @@ public function testHandle() {
     $config->getCacheContexts()->willReturn([]);
     $config->getCacheTags()->willReturn([]);
     $config->getCacheMaxAge()->willReturn(12);
-    $this->entityStorage->load('restplugin')->willReturn($config->reveal());
 
     // Response returns NULL this time because response from plugin is not
     // a ResourceResponse so it is passed through directly.
-    $response = $this->requestHandler->handle($route_match, $request);
+    $response = $this->requestHandler->handle($route_match, $request, $config->reveal());
     $this->assertEquals(NULL, $response);
 
     // Response will return a ResourceResponse this time.
     $response = new ResourceResponse([]);
     $resource->get(NULL, $request)
       ->willReturn($response);
-    $handler_response = $this->requestHandler->handle($route_match, $request);
+    $handler_response = $this->requestHandler->handle($route_match, $request, $config->reveal());
     $this->assertEquals($response, $handler_response);
 
     // We will call the patch method this time.
@@ -88,7 +86,7 @@ public function testHandle() {
     $resource->patch(NULL, $request)
       ->shouldBeCalledTimes(1)
       ->willReturn($response);
-    $handler_response = $this->requestHandler->handle($route_match, $request);
+    $handler_response = $this->requestHandler->handle($route_match, $request, $config->reveal());
     $this->assertEquals($response, $handler_response);
   }
 
