What is Spring
来源:互联网 发布:sql查重复记录 编辑:程序博客网 时间:2024/06/01 17:40
Spring is a framework that help software developers to build a better enterprise.It has two primary features which are dependency injection(DI) and aspect-oriented programming.In a word,at the root of almost everything Spring provides are a few foundational ideas,all foucused on Spring's fundamental mission:Spring simplifies Java development. public class Person{
Food favoriteFood;
public Person(){
favoriteFood =new Apple();
}
public void eat(){
System.out.println(favoriteFood.name);
}
}OK,Now I can eat my favorite Food.But there is a problem.One day I find I don't like apple any more,maybe I like Banana.So what should I do?Change my program?I can't belive that I only want to eat Banana,you tell my to change my program?
For example,When I want to eat an apple.What should I do?I think I should go to the supermarket(what I means was that I have the responsibility to care about what I really need,where I should to find them.Oh my god,there are so many things to do).So the grogram is just like this:
Food favoriteFood;
public Person(){
favoriteFood =new Apple();
}
public void eat(){
System.out.println(favoriteFood.name);
}
}OK,Now I can eat my favorite Food.But there is a problem.One day I find I don't like apple any more,maybe I like Banana.So what should I do?Change my program?I can't belive that I only want to eat Banana,you tell my to change my program?
Why can't our program be flexible、maintainable,Scalable?Because We use the key word "new",this word tell our program there is no change forever,just use it.But how to simplify Java development?
To beck up its attack on Java complexity,Spring employs four key strategies:
1、Lightweight and minimally invasive development with POJOs.
2、Loose coupling through DI and interface orientation.
3、Declarative programming through aspects and common conventions.
4、Eliminating boilerplate code with aspects and templates.
1 0
- what is spring
- What is Spring
- what is spring boot
- Spring Framework : What is Spring?
- Introduction: What is Spring Security?
- what is spring io platform
- Spring security 介绍: what is spring security?
- What is Dispatcher Servlet in Spring?
- [Spring MVC] What is my Spring MVC controller not working?
- What is what ?!
- what is what?
- What is portal? & What is portlet?
- what is game? what is good game?
- What Is 'SSL'? What Is 'SSH'?
- WHAT IS C#
- What is System Administration?
- What is EDI?
- What Is Wiki
- Hdu 5452 Minimum Cut (图论问题) 2015 ACM-ICPC沈阳网赛
- Android之Gallery的使用
- c++ bitset类用法
- Json数据的解析-Gson
- 浮点转定点运算
- What is Spring
- 字符串的循环左移,不用库函数,三步循环
- java字符集编码问题
- UE4拾取物体
- 字典排序
- linux下多进程/多线程文件操作详解
- Myeclipse导出uml类图和导出javadoc时"错误: 编码GBK的不可映射字符"解决
- Vs2012调试本地windows服务
- bootstrap弹出框个人demo