Przeglądaj źródła

Detab code and fix link to spring-boot-maven-plugin

Greg Turnquist 13 lat temu
rodzic
commit
e42f602a2d

+ 35
- 35
README.md Wyświetl plik

@@ -138,12 +138,12 @@ import org.springframework.web.bind.annotation.ResponseBody;
138 138
 
139 139
 @Controller
140 140
 public class HelloController {
141
-	
142
-	@RequestMapping("/")
143
-	public @ResponseBody String index() {
144
-		return "Greetings from Spring Boot!";
145
-	}
146
-	
141
+    
142
+    @RequestMapping("/")
143
+    public @ResponseBody String index() {
144
+        return "Greetings from Spring Boot!";
145
+    }
146
+    
147 147
 }
148 148
 ```
149 149
     
@@ -171,18 +171,18 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
171 171
 @EnableWebMvc
172 172
 @ComponentScan
173 173
 public class Application {
174
-	
175
-	public static void main(String[] args) {
176
-		ApplicationContext ctx = SpringApplication.run(Application.class, args);
177
-		
178
-		System.out.println("Let's inspect the beans provided by Spring Boot:");
179
-		
180
-		String[] beanNames = ctx.getBeanDefinitionNames();
181
-		Arrays.sort(beanNames);
182
-		for (String beanName : beanNames) {
183
-			System.out.println(beanName);
184
-		}
185
-	}
174
+    
175
+    public static void main(String[] args) {
176
+        ApplicationContext ctx = SpringApplication.run(Application.class, args);
177
+        
178
+        System.out.println("Let's inspect the beans provided by Spring Boot:");
179
+        
180
+        String[] beanNames = ctx.getBeanDefinitionNames();
181
+        Arrays.sort(beanNames);
182
+        for (String beanName : beanNames) {
183
+            System.out.println(beanName);
184
+        }
185
+    }
186 186
 
187 187
 }
188 188
 ```
@@ -291,23 +291,23 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
291 291
 @EnableWebMvc
292 292
 @ComponentScan
293 293
 public class Application {
294
-	
295
-	@Bean
296
-	MultipartConfigElement multipartConfigElement() {
297
-		return new MultipartConfigElement("");
298
-	}
299
-	
300
-	public static void main(String[] args) {
301
-		ApplicationContext ctx = SpringApplication.run(Application.class, args);
302
-		
303
-		System.out.println("Let's inspect the beans provided by Spring Boot:");
304
-		
305
-		String[] beanNames = ctx.getBeanDefinitionNames();
306
-		Arrays.sort(beanNames);
307
-		for (String beanName : beanNames) {
308
-			System.out.println(beanName);
309
-		}
310
-	}
294
+    
295
+    @Bean
296
+    MultipartConfigElement multipartConfigElement() {
297
+        return new MultipartConfigElement("");
298
+    }
299
+    
300
+    public static void main(String[] args) {
301
+        ApplicationContext ctx = SpringApplication.run(Application.class, args);
302
+        
303
+        System.out.println("Let's inspect the beans provided by Spring Boot:");
304
+        
305
+        String[] beanNames = ctx.getBeanDefinitionNames();
306
+        Arrays.sort(beanNames);
307
+        for (String beanName : beanNames) {
308
+            System.out.println(beanName);
309
+        }
310
+    }
311 311
 
312 312
 }
313 313
 ```

+ 17
- 17
complete/src/main/java/hello/Application.java Wyświetl plik

@@ -17,22 +17,22 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
17 17
 @EnableWebMvc
18 18
 @ComponentScan
19 19
 public class Application {
20
-	
21
-	@Bean
22
-	MultipartConfigElement multipartConfigElement() {
23
-		return new MultipartConfigElement("");
24
-	}
25
-	
26
-	public static void main(String[] args) {
27
-		ApplicationContext ctx = SpringApplication.run(Application.class, args);
28
-		
29
-		System.out.println("Let's inspect the beans provided by Spring Boot:");
30
-		
31
-		String[] beanNames = ctx.getBeanDefinitionNames();
32
-		Arrays.sort(beanNames);
33
-		for (String beanName : beanNames) {
34
-			System.out.println(beanName);
35
-		}
36
-	}
20
+    
21
+    @Bean
22
+    MultipartConfigElement multipartConfigElement() {
23
+        return new MultipartConfigElement("");
24
+    }
25
+    
26
+    public static void main(String[] args) {
27
+        ApplicationContext ctx = SpringApplication.run(Application.class, args);
28
+        
29
+        System.out.println("Let's inspect the beans provided by Spring Boot:");
30
+        
31
+        String[] beanNames = ctx.getBeanDefinitionNames();
32
+        Arrays.sort(beanNames);
33
+        for (String beanName : beanNames) {
34
+            System.out.println(beanName);
35
+        }
36
+    }
37 37
 
38 38
 }

+ 6
- 6
complete/src/main/java/hello/HelloController.java Wyświetl plik

@@ -6,10 +6,10 @@ import org.springframework.web.bind.annotation.ResponseBody;
6 6
 
7 7
 @Controller
8 8
 public class HelloController {
9
-	
10
-	@RequestMapping("/")
11
-	public @ResponseBody String index() {
12
-		return "Greetings from Spring Boot!";
13
-	}
14
-	
9
+    
10
+    @RequestMapping("/")
11
+    public @ResponseBody String index() {
12
+        return "Greetings from Spring Boot!";
13
+    }
14
+    
15 15
 }

+ 12
- 12
initial/src/main/java/hello/Application.java Wyświetl plik

@@ -14,17 +14,17 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc;
14 14
 @EnableWebMvc
15 15
 @ComponentScan
16 16
 public class Application {
17
-	
18
-	public static void main(String[] args) {
19
-		ApplicationContext ctx = SpringApplication.run(Application.class, args);
20
-		
21
-		System.out.println("Let's inspect the beans provided by Spring Boot:");
22
-		
23
-		String[] beanNames = ctx.getBeanDefinitionNames();
24
-		Arrays.sort(beanNames);
25
-		for (String beanName : beanNames) {
26
-			System.out.println(beanName);
27
-		}
28
-	}
17
+    
18
+    public static void main(String[] args) {
19
+        ApplicationContext ctx = SpringApplication.run(Application.class, args);
20
+        
21
+        System.out.println("Let's inspect the beans provided by Spring Boot:");
22
+        
23
+        String[] beanNames = ctx.getBeanDefinitionNames();
24
+        Arrays.sort(beanNames);
25
+        for (String beanName : beanNames) {
26
+            System.out.println(beanName);
27
+        }
28
+    }
29 29
 
30 30
 }

+ 6
- 6
initial/src/main/java/hello/HelloController.java Wyświetl plik

@@ -6,10 +6,10 @@ import org.springframework.web.bind.annotation.ResponseBody;
6 6
 
7 7
 @Controller
8 8
 public class HelloController {
9
-	
10
-	@RequestMapping("/")
11
-	public @ResponseBody String index() {
12
-		return "Greetings from Spring Boot!";
13
-	}
14
-	
9
+    
10
+    @RequestMapping("/")
11
+    public @ResponseBody String index() {
12
+        return "Greetings from Spring Boot!";
13
+    }
14
+    
15 15
 }