From 098fed906e86f7f66df9a9bd08d6aa3725dbcc08 Mon Sep 17 00:00:00 2001 From: qibaoguang Date: Thu, 30 Apr 2015 20:14:07 +0800 Subject: [PATCH] Update B.2.1. Nested properties.md --- X. Appendices/B.2.1. Nested properties.md | 25 +++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/X. Appendices/B.2.1. Nested properties.md b/X. Appendices/B.2.1. Nested properties.md index e69de29..16039f7 100644 --- a/X. Appendices/B.2.1. Nested properties.md +++ b/X. Appendices/B.2.1. Nested properties.md @@ -0,0 +1,25 @@ +### 附录 B.2.1 内嵌属性 + +该注解处理器自动将内部类当做内嵌属性处理。例如,下面的类: +```java +@ConfigurationProperties(prefix="server") +public class ServerProperties { + + private String name; + + private Host host; + + // ... getter and setters + + private static class Host { + + private String ip; + + private int port; + + // ... getter and setters + + } + +} +```