File tree Expand file tree Collapse file tree
src/main/java/org/baeldung/web/controller Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <!DOCTYPE module PUBLIC
3+ "-//Puppy Crawl//DTD Check Configuration 1.3//EN"
4+ "http://www.puppycrawl.com/dtds/configuration_1_3.dtd">
5+ <module name =" Checker" >
6+ <module name =" TreeWalker" >
7+ <module name =" AvoidStarImport" >
8+ <property name =" severity" value =" warning" />
9+ </module >
10+ </module >
11+ </module >
Original file line number Diff line number Diff line change 219219 </configuration >
220220 </configuration >
221221 </plugin >
222+
223+ <plugin >
224+ <groupId >org.apache.maven.plugins</groupId >
225+ <artifactId >maven-checkstyle-plugin</artifactId >
226+ <version >${checkstyle-maven-plugin.version} </version >
227+ <configuration >
228+ <configLocation >checkstyle.xml</configLocation >
229+ </configuration >
230+ <executions >
231+ <execution >
232+ <goals >
233+ <goal >check</goal >
234+ </goals >
235+ </execution >
236+ </executions >
237+ </plugin >
222238
223239 </plugins >
224240
311327
312328 </profiles >
313329
330+ <reporting >
331+ <plugins >
332+ <plugin >
333+ <groupId >org.apache.maven.plugins</groupId >
334+ <artifactId >maven-checkstyle-plugin</artifactId >
335+ <version >${checkstyle-maven-plugin.version} </version >
336+ <configuration >
337+ <configLocation >checkstyle.xml</configLocation >
338+ </configuration >
339+ </plugin >
340+ </plugins >
341+ </reporting >
342+
314343 <properties >
315344 <commons-fileupload .version>1.3.2</commons-fileupload .version>
316345 <kryo .version>4.0.0</kryo .version>
325354 <!-- Maven plugins -->
326355 <cargo-maven2-plugin .version>1.6.0</cargo-maven2-plugin .version>
327356 <findbugs-maven-plugin .version>3.0.4</findbugs-maven-plugin .version>
328-
357+ <checkstyle-maven-plugin .version>3.0.0</checkstyle-maven-plugin .version>
358+ <dependency .locations.enabled>false</dependency .locations.enabled>
329359 <!-- okhttp -->
330360 <com .squareup.okhttp3.version>3.4.1</com .squareup.okhttp3.version>
331361
Original file line number Diff line number Diff line change 11package org .baeldung .web .controller ;
22
33
4+ import java .util .Map ;
5+
46import org .baeldung .repository .HeavyResourceRepository ;
57import org .baeldung .web .dto .HeavyResource ;
68import org .baeldung .web .dto .HeavyResourceAddressOnly ;
79import org .springframework .http .MediaType ;
810import org .springframework .http .ResponseEntity ;
9- import org .springframework .web .bind .annotation .*;
10-
11- import java .util .Map ;
11+ import org .springframework .web .bind .annotation .PathVariable ;
12+ import org .springframework .web .bind .annotation .RequestBody ;
13+ import org .springframework .web .bind .annotation .RequestMapping ;
14+ import org .springframework .web .bind .annotation .RequestMethod ;
15+ import org .springframework .web .bind .annotation .RestController ;
1216
1317@ RestController
1418public class HeavyResourceController {
Original file line number Diff line number Diff line change 22
33import org .baeldung .web .dto .BaeldungItem ;
44import org .baeldung .web .dto .BaeldungItemV2 ;
5- import org .springframework .web .bind .annotation .*;
5+ import org .springframework .web .bind .annotation .PathVariable ;
6+ import org .springframework .web .bind .annotation .RequestMapping ;
7+ import org .springframework .web .bind .annotation .RequestMethod ;
8+ import org .springframework .web .bind .annotation .ResponseBody ;
9+ import org .springframework .web .bind .annotation .RestController ;
610
711@ RestController
812@ RequestMapping (value = "/" , produces = "application/vnd.baeldung.api.v1+json" )
You can’t perform that action at this time.
0 commit comments