Spring core Project - Smart Tech Guides

Latest

Hi this is Sravan Kumar from India. SMART TECH GUIDES is a technical blog. it helps you to learn about Java topics, frameworks and tools like Jenkins, GitHub & related explanations, data base related topics. All these Explanations are explained in simple and understandable manner.

Subscribe Us

SMART TECH GUIDES

Spring core Project

Spring Project


creating spring project using maven build tool. 


steps involved in spring project(core) development 

1) create new Maven project 

2) add spring context jar inside pom.xml 

3) create beans configured Java/xml file 

4) write Java code inside src/main/java Java code

Java code

 Card Interface KotakBank implements Card Interface AxisBank implements Card Interface Injecting Card by Perform Setter Injection Application Start Point  


Project Folder Structure

Spring folder Structure



 pom.xml

 


 beans.xml


Note: spring beans we can configure in 3 ways

1) xml based configuration file

 Configure <beans> inside beans.xml file

 

2) annotation-based configuration

Configure <context:annotation-config/> inside beans.xml file and use annotations inside Java class. 


3) Java based configuration

Configurations happen in Java file without xml file.

with the help of annotations like @configuration, @component, @service, @controller.. etc.! 


No comments:

Post a Comment