simple Controller not working with Magento2

Run the following code to fix the issue..

sudo -u www-data php bin/magento setup:di:compile