src/mg/Ding/Bean/Factory/Driver/MvcAnnotationDriver.php
public function afterConfig()
    {
        foreach ($this->reflectionFactory->getClassesByAnnotation('controller') as $controller) {
            foreach ($this->_container->getBeansByClass($controller) as $name) {
                $annotations = $this->reflectionFactory->getClassAnnotations($controller);
                if (!$annotations->contains('requestmapping')) {
                    continue;
                }
                $requestMappings = $annotations->getAnnotations('requestmapping');
                foreach ($requestMappings as $map) {
                    if ($map->hasOption('url')) {
                        foreach ($map->getOptionValues('url') as $url) {
                            HttpUrlMapper::addAnnotatedController($url, $name);
                        }
                    }
                }
            }
        }
    }
public function afterConfig()
    {
        foreach ($this->reflectionFactory->getClassesByAnnotation('controller') as $controller) {
            foreach ($this->_container->getBeansByClass($controller) as $name) {
                $annotations = $this->reflectionFactory->getClassAnnotations($controller);
                if (!$annotations->contains('requestmapping')) {
                    continue;
                }
                $requestMappings = $annotations->getAnnotations('requestmapping');
                foreach ($requestMappings as $map) {
                    if ($map->hasOption('url')) {
                        foreach ($map->getOptionValues('url') as $url) {
                            HttpUrlMapper::addAnnotatedController($url, $name);
                        }
                    }
                }
            }
        }
    }
Will call HttpUrlMapper::addAnnotatedController to add new mappings
from the @Controller annotated classes. Also, creates a new bean
definition for every one of them.

(non-PHPdoc)
@see Ding\Bean\Lifecycle.ILifecycleListener::afterConfig()