This course will be retired on January 8, 2022.
Adding a Spring Configuration File5:16 with Chris Ramacciotti
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 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.
You need to sign up for Treehouse in order to download course files.Sign up