Heads up! To view this whole video, sign in with your Courses account or enroll in your free 7-day trial. Sign In Enroll
Start a free Courses trial
to watch this video
In this video, we'll add the minimum required configuration details for Spring, so that upon launching our application, all components are properly discovered.
Localhost
Localhost is the alias or hostname that maps to the IP address of your own local machine. That IP address is 127.0.0.1.
Configuration with JavaConfig or XML
If you want to explore alternate forms of configuring your Spring application, check out the Spring docs for Enabling the MVC Java Config or the MVC XML Namespace.
In the case of JavaConfig, you'll substitute the @EnableAutoConfiguration
annotation for @EnableWebMvc
, and then add methods that programmatically define, for example, your template engine, such as Thymeleaf.
In the case of XML, you'll place your Spring configuration into one or more XML files placed in your classpath. The resources
directory is on the classpath, so these files can be placed here.
Related Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign upRelated Discussions
Have questions about this video? Start a discussion with the community and Treehouse staff.
Sign up
You need to sign up for Treehouse in order to download course files.
Sign upYou need to sign up for Treehouse in order to set up Workspace
Sign up