Quellcode durchsuchen

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

Greg Turnquist vor 13 Jahren
Ursprung
Commit
e42f602a2d

+ 35
- 35
README.md Datei anzeigen

138
 
138
 
139
 @Controller
139
 @Controller
140
 public class HelloController {
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
 @EnableWebMvc
171
 @EnableWebMvc
172
 @ComponentScan
172
 @ComponentScan
173
 public class Application {
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
 @EnableWebMvc
291
 @EnableWebMvc
292
 @ComponentScan
292
 @ComponentScan
293
 public class Application {
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 Datei anzeigen

17
 @EnableWebMvc
17
 @EnableWebMvc
18
 @ComponentScan
18
 @ComponentScan
19
 public class Application {
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 Datei anzeigen

6
 
6
 
7
 @Controller
7
 @Controller
8
 public class HelloController {
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 Datei anzeigen

14
 @EnableWebMvc
14
 @EnableWebMvc
15
 @ComponentScan
15
 @ComponentScan
16
 public class Application {
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 Datei anzeigen

6
 
6
 
7
 @Controller
7
 @Controller
8
 public class HelloController {
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
 }