title: Micronaut - Get Running environment name in the view
body: <p>I have a small Micronaut application with a view layer (thymeleaf). Now I want to integrate Google Analytics or some other tracking tool. Of course this should be just loaded in production mode but how can I do a check for the environment in the view layer?</p>
  
  <p>I start the application in the following way:</p>
  
  <p>java -Dmicronaut.environments=prod -jar mywebsite.jar</p>