![](https://img-blog.csdnimg.cn/20201014180756922.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
spring-framework
文章平均质量分 89
邓闰土
我的简书 http://www.jianshu.com/u/f109f1576a46
展开
-
Overview of Spring Framework
The Spring Framework is a lightweight solution and a potential one-stop-shop for building your enterprise-ready applications. However, Spring is modular, allowing you to use only those parts that you n原创 2017-05-29 18:52:17 · 492 阅读 · 0 评论 -
Instantiating a container
3.2.2 Instantiating a containerInstantiating a Spring IoC container is straightforward. The location path or paths supplied to an ApplicationContext constructor are actually resource strings that allow原创 2017-06-04 01:45:50 · 330 阅读 · 0 评论 -
onfiguration metadata
3.2.1 Configuration metadata(配置元数据)As the preceding diagram shows, the Spring IoC container consumes a form of configuration metadata; this configuration metadata represents how you as an application d原创 2017-06-03 15:19:05 · 356 阅读 · 0 评论 -
Using the container
The ApplicationContext is the interface for an advanced factory capable of maintaining a registry of different beans and their dependencies. Using the method T getBean(String name, Class requiredType)原创 2017-06-04 02:14:10 · 272 阅读 · 0 评论 -
Naming beans
3.3.1 Naming beansEvery bean has one or more identifiers. These identifiers must be unique within the container that hosts the bean. A bean usually has only one identifier, but if it requires more than原创 2017-06-04 16:37:16 · 428 阅读 · 0 评论 -
Spring4.3入门 Spring 整合hikari
<dependency> <groupId>com.zaxxer</groupId> <artifactId>HikariCP</artifactId> <version>${hikaricp.version}</version> </dependency> <context:property-placeh原创 2017-11-20 20:40:16 · 1971 阅读 · 0 评论 -
Spring4.3入门 Spring 依赖注入
属性注入 属性注入即通过 setter 方法注入Bean 的属性值或依赖的对象 属性注入使用 元素, 使用 name 属性指定 Bean 的属性名称,value 属性或 子节点指定属性值 属性注入是实际应用中最常用的注入方式 <bean id="helloword" class="cn.nokia.pojo.Helloword"> <property na原创 2017-11-20 20:40:54 · 344 阅读 · 0 评论 -
Spring4.3入门 ApplicationContext介绍
ApplicationContext 的主要实现类:ClassPathXmlApplicationContext:从 类路径下加载配置文件FileSystemXmlApplicationContext: 从文件系统中加载配置文件ConfigurableApplicationContext 扩展于ApplicationContext,新增加两个主要方法: refresh() close(),原创 2017-11-20 20:41:17 · 534 阅读 · 0 评论 -
Spring4.3入门 Ioc 容器中配置bean
在xml 文件中通过bean 节点来配置bean <bean id="helloword" class="cn.nokia.pojo.Helloword"> <property name="name" value="erhuan"> </property> </bean>注id 为Bean的名称id在容器中是唯一的id没有指定那么会使用bean的名字id原创 2017-11-20 20:41:39 · 326 阅读 · 0 评论 -
Spring4.3入门 配置bean
bean 配置的形式使用XML文件的方式基于注解的方法Bean 的配置方式全类名 反射工厂方法FactoryBean依赖注入的方法属性注入构造器注入自动转配bean的关系继承依赖Spring 容器Spring 在读取配置创建bean实例之前必须进行实例化,只有进行实例化之后才能 从ioc容器中读取实例并且使用。Spring提供了两种类型的IOC容器实现 BeanFac原创 2017-11-20 20:41:58 · 761 阅读 · 0 评论 -
Spring4.3入门 Spring 依赖关系
spring的jar包只有20个左右,每个都有相应的功能,一个jar还可能依赖了若干其他jar ,所以,搞清楚它们之间的关系,配置maven依赖就可以简洁明了,下面举个例子,要在普通java工程使用spring框架,需要哪些jar呢?只要一个 <properties> <spring.version>4.3.10.RELEASE</spring.version>原创 2017-11-20 20:42:19 · 1161 阅读 · 0 评论 -
Spring4.3入门 Spel
SpEL,即Spring表达式语言,是一个支持运行时查询和操作对象图的强大的表达式语言。SpEL为Bean的属性进行动态赋值提供了便利:+计算表达式的值正则表达式的匹配通过 bean 的 id 对 bean 进行引用调用方法以及引用对象中的属性,支持方法的链式操作调用静态方法或静态属性语法:SpEL使用#{}作为定界符,所有在定界符内的字符都将被认为是SpEL。字面量p:price="#原创 2017-11-20 20:42:37 · 513 阅读 · 0 评论 -
Spring4.3入门 引用外部文件
情景,使用服务器环境文件,比如服务器地址数据等。Spring 提供了一个叫做PropertyPlaceholderConfigured的BeanFactory处理器,允许将Bean配置文件 移植到外部文件中,可以在bean中使用 ${var} 形式调用注册:Spring2.5 后简化的配置方式在 中添加 定义在配置文件中假如如下配置实例创建外部属性文件price=3000dis=long原创 2017-11-20 20:43:17 · 457 阅读 · 0 评论 -
Spring4.3入门 bean的作用域介绍
测试方法 ApplicationContext ctx = new ClassPathXmlApplicationContext("hhh.xml"); Persons pp = (Persons) ctx.getBean("huan"); Persons pps = (Persons) ctx.getBean("huan"); System.out.println(pp == pps)值原创 2017-11-25 15:44:14 · 2993 阅读 · 0 评论 -
Spring4.3入门 Spring bean继承
Spring 允许继承bean的配置被继承的成为父bean继承的bean 使用parent 继承父bean子bean 从父bean中继承大多数的配置 出去 autowire 以及 abstract等父bean 可以作为模板 也可以被实例化,用abstract修饰的bean只是一个 模板bean 这样Spring 不会实例化这个bean可以忽略calss 让子bean指定自己的类 ,但是原创 2017-11-25 15:45:26 · 408 阅读 · 0 评论 -
Spring4.3入门 快速上手Spring
Spring Spring 框架是一个集合了很多东西的框架, 最核心最底层的就是IoC/DI. 在这个基础之上, 有很多诸如 AOC, ORM, WebMVC, DAO, Context 之类的功能(容器). IoC/DI 控制反转, 依赖注入. 就是你的类对应的对象不用你来 new, 框架帮你 new, 帮你 new 完了再放到你指定的变量里面, 你直接用就行. 他还帮你管理他什么时原创 2017-11-25 15:44:43 · 502 阅读 · 0 评论 -
Spring4.3入门 自动装配
Spring Ioc容器可以自动装配Bean 需要做的仅仅是<bean> 的autowire苏醒中指定自动装配的类型byType 根据类型自动装配, 需要保证Ioc 容器中该类型只有一个byName 根据名字自动装配, Bean的名称与属性名设置一致constructor 不推荐使用autowire 会自动装配所有的属性,不灵活byType与byName 不能兼容构造很少使用原创 2017-11-25 15:45:53 · 372 阅读 · 0 评论 -
Spring boot JPA Spring Security
代码链接 参考: http://blog.csdn.net/u012367513/article/details/38866465 https://segmentfault.com/a/1190000012260914#articleHeader9 https://juejin.im/entry/5a2d4c6af265da4322412262原创 2018-01-30 23:15:35 · 307 阅读 · 0 评论 -
Dependencies and configuration in detail
3.4.2 Dependencies and configuration in detail(详细介绍依赖以及配置)As mentioned in the previous section, you can define bean properties and constructor arguments as references to other managed beans (collaborat原创 2017-06-07 23:11:09 · 520 阅读 · 1 评论 -
Introduction to the Spring IoC container and beans
3 The IoC container(IOC容器)3.1 Introduction to the Spring IoC container and beans(Spring IOC容器与beans的介绍)This chapter covers the Spring Framework implementation of the Inversion of Control (IoC) [1] prin原创 2017-06-03 01:58:07 · 422 阅读 · 0 评论 -
Spring Framework 介绍
Introduction to the Spring FrameworkThe Spring Framework is a Java platform that provides comprehensive infrastructure support for developing Java applications. Spring handles the infrastructure so you原创 2017-05-29 22:09:20 · 597 阅读 · 0 评论 -
Spring Framework Modules
The Spring Framework consists of features organized into about 20 modules. These modules are grouped into Core Container, Data Access/Integration, Web, AOP (Aspect Oriented Programming), Instrumentatio原创 2017-05-29 22:25:39 · 506 阅读 · 0 评论 -
AOP and Instrumentation
2.2.2 AOP and InstrumentationThe spring-aop module provides an AOP Alliance-compliant aspect-oriented programming implementation allowing you to define, for example, method interceptors and pointcuts t原创 2017-05-30 22:21:12 · 510 阅读 · 0 评论 -
Core Container
Core ContainerThe Core Container consists of the spring-core, spring-beans, spring-context, spring-context-support, and spring-expression (Spring Expression Language) modules.Core Container由spring-core原创 2017-05-30 22:03:43 · 544 阅读 · 0 评论 -
Messaging
MessagingSpring Framework 4 includes a spring-messaging module with key abstractions from the Spring Integration project such as Message, MessageChannel, MessageHandler, and others to serve as a founda原创 2017-05-30 22:37:12 · 606 阅读 · 0 评论 -
Data Access/Integration
The Data Access/Integration layer consists of the JDBC, ORM, OXM, JMS, and Transaction modules.Data Access/Integration层包括了 JDBC、ORM、OXM以及事务模块The spring-jdbc module provides a JDBC-abstraction layer tha原创 2017-05-30 22:52:54 · 1035 阅读 · 0 评论 -
Instantiating beans
3.3.2 Instantiating beans (实例化beans)A bean definition essentially is a recipe for creating one or more objects. The container looks at the recipe for a named bean when asked, and uses the configuration原创 2017-06-04 21:59:03 · 302 阅读 · 0 评论 -
Web Moudle
The Web layer consists of the spring-web, spring-webmvc and spring-websocket modules.Web层由spring-web,spring-webmvc和spring-websocket 模块组成。The spring-web module provides basic web-oriented integration fe原创 2017-05-31 15:42:54 · 473 阅读 · 0 评论 -
Test Module
The spring-test module supports the unit testing and integration testing of Spring components with JUnit or TestNG. It provides consistent loading of Spring ApplicationContexts and caching of those con原创 2017-05-31 15:44:32 · 578 阅读 · 0 评论 -
Bean overview
3.3 Bean overviewA Spring IoC container manages one or more beans. These beans are created with the configuration metadata that you supply to the container, for example, in the form of XML definitions原创 2017-06-04 13:55:10 · 328 阅读 · 0 评论 -
Usage scenarios
The building blocks described previously make Spring a logical choice in many scenarios, from embedded applications that run on resource-constrained devices to full-fledged enterprise applications that原创 2017-05-31 21:46:04 · 551 阅读 · 0 评论 -
Dependency Management and Naming Conventions
Dependency management and dependency injection are different things. To get those nice features of Spring into your application (like dependency injection) you need to assemble all the libraries needed原创 2017-05-31 22:51:54 · 338 阅读 · 0 评论 -
Dependencies
3.4 Dependencies A typical enterprise application does not consist of a single object (or bean in the Spring parlance). Even the simplest application has a few objects that work together to present wh原创 2017-06-05 20:28:01 · 822 阅读 · 0 评论 -
Setter-based dependency injection
Setter-based dependency injection(基于setter 的依赖注入)Setter-based DI is accomplished by the container calling setter methods on your beans after invoking a no-argument constructor or no-argument static fac原创 2017-06-05 23:26:29 · 1215 阅读 · 2 评论 -
Spring Dependencies and Depending on Spring
Spring的依赖和被依赖Although Spring provides integration and support for a huge range of enterprise and other external tools, it intentionally keeps its mandatory dependencies to an absolute minimum: you shou原创 2017-06-01 14:57:40 · 444 阅读 · 0 评论 -
Logging
LoggingLogging is a very important dependency for Spring because a) it is the only mandatory external dependency, b) everyone likes to see some output from the tools they are using, and c) Spring integ原创 2017-06-02 19:39:03 · 325 阅读 · 0 评论 -
Core Technologies
This part of the reference documentation covers all of those technologies that are absolutely integral to the Spring Framework.参考文档这部分包含的内容都是,Spring Framework不可或缺的。Foremost amongst these is the Spring原创 2017-06-03 00:59:19 · 447 阅读 · 0 评论 -
认证鉴权与API权限控制在微服务架构中的设计与实现 参考文件目录
认证鉴权与API权限控制在微服务架构中的设计与实现一 认证鉴权与API权限控制在微服务架构中的设计与实现二 认证鉴权与API权限控制在微服务架构中的设计与实现四 认证鉴权与API权限控制在微服务架构中的设计与实现五原创 2018-02-07 14:44:27 · 317 阅读 · 0 评论