Science & Technology

#8 Spring without Boot

by Telusko

Share:

📚 Main topics

  • Why use Spring without Spring BootThe video explains how to work directly with the Spring Framework when a project cannot or should not use Spring Boot, and how manual setup makes Spring’s configuration process clearer. 0:00
  • Creating a Maven projectA basic Maven quick-start project is created in IntelliJ IDEA, then a simple Dev class is added to demonstrate the application before Spring is introduced. 1:33
  • Adding Spring and creating the contextThe Spring Context dependency is added to the project, and ClassPathXmlApplicationContext is introduced to create the application context from an XML configuration file. 8:20
  • Starting the XML configurationThe app is configured to load spring.xml from the classpath, so a resources directory and an initially empty XML file are created. 11:57

✨ Key takeaways

  • Spring Boot handles setup automaticallyWithout Spring Boot, the developer must add Spring dependencies and explicitly configure the application context. 1:02
  • The context manages Spring objectsSpring’s application context provides access to beans, but the context needs configuration before it can supply the requested Dev object. 7:16
  • Use a classpath resources folderThe XML configuration file must be placed where the classpath can find it; an empty file still produces an XML parsing error. 12:27

🧠 Lessons learned

  • Check a new project firstRun the project before adding features to verify its basic setup works. 5:43
  • Choose dependencies carefullyThe tutorial recommends using a Spring Context version without known vulnerabilities and reloading Maven changes after adding it. 8:51
  • An interface cannot be instantiated directlyApplicationContext is an interface, so the example uses its ClassPathXmlApplicationContext implementation. 10:25

🏁 Conclusion/next steps

  • Continue with XML bean configurationThe video ends after creating spring.xml; the next step is to add configuration so Spring can create the Dev bean. 12:58

Transcript excerpt

0:00 welcome back aliens my name is Zin readyy and in this video we'll talk about spring framework hold on we have talked about spring framework but then when we started coding uh in between we talked about spring Boot and the project which we have created is done with the help of spring Boot and things are bit easy right but what if you don't want to use spring boot what if you want to work on a spring framework so there are two reasons why this video is important first what if the project you are working on in your company or maybe by yourself you don't want to use spring

0:30 boot or you don't have a choice of using a spring boot so this video becomes important to understand how do you work with spring framework second reason for this video is in this video you will understand what is happening behind the scene right how spring analyze the configuration and what are different aspect of this uh configuration so we'll talk about it of course we have discussed those things in the spring boot as well but when you do it here it will make much more sense so the project which we have here again a simple project what we have done till now is we

🔒 The full, searchable transcript is available with Pro.

🔒 Unlock Premium Features

This is a premium feature. Upgrade to unlock unlimited Q&A, transcripts, mindmaps, and translations.

🔒 Unlock Premium Features

Access to Chat is a premium feature. Upgrade now to unlock unlimited studying tools.

🔒 Unlock Premium Features

Access to Mindmap is a premium feature. Upgrade now to unlock unlimited studying tools.

🔒 Unlock Premium Features

Access to Translation is a premium feature. Upgrade now to unlock unlimited studying tools.

Get unlimited summaries, Q&A, transcripts and more with Pro

Upgrade to Pro

Suggestions

🔒 Unlock Premium Features

Access to AI Suggestions is a premium feature. Upgrade now to unlock unlimited studying tools.