Use route annotation
AFAIK, Drupal doesn't support any of the Symfony route annotations.  The code is present in vendor/, but not used by core.

The closest thing is the concept of Entity links, which are part of the Doctrine annotations on the entity class.  These link names can be used in the ::toUrl() method to generate the canonical link for an entity, the edit link, etc.  However, the routes still need to be defined in the routing.yml file.