Difference between Java EE and Spring framework
Java EE is an standard, official, specification for a full featured Enterprise Application Framework stack. Includes stuff like Object-Relational Mapping, Security, Web Applications, database connectivity, transactions...
On top of Java EE specifications there are JavaEE implementations/application servers like: JBoss, Glassfish, WebSphere, Weblogic.
Spring on the other hand, is a framework doing lots of the stuff on the Java EE specifications, but in its own form. They don't follow Java EE specifications and APIs for that. But they do include a Web Framework, transaction management, security and several other solutions Java EE offers.
Java EE:
- Java EE industry approved standard API based framework
- It is predominantly based on annotations and CDI
- JFC MVC framework for web development
- JPA specification to process DB operation
- JTA API with implementation
- EJB container and POJO based implementation
- Oracle license
Spring:
- Based on IOC and AOP
- Based on XML configuration (now they are leveraging annotation)
- Uses Spring DAO framework (based on Template design pattern) to connect to database
- Provides abstraction layer to support various JTA implementation vendor
- Integrates with various Java vendors to support different capabilities such as struts etc
- Provides an end-to-end platform to build web application achieving loose coupling using DI and AOP
- Open source license