Skip to content

Commit 856be0a

Browse files
author
eugenp
committed
formatting work
1 parent eb7650e commit 856be0a

128 files changed

Lines changed: 2160 additions & 2396 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎spring-akka/src/main/java/org/baeldung/akka/SpringExtension.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,5 +29,4 @@ public Props props(String actorBeanName) {
2929

3030
}
3131

32-
3332
}

‎spring-akka/src/test/java/org/baeldung/akka/SpringAkkaTest.java‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,7 @@ public class SpringAkkaTest extends AbstractJUnit4SpringContextTests {
2727

2828
@Test
2929
public void whenCallingGreetingActor_thenActorGreetsTheCaller() throws Exception {
30-
ActorRef greeter = system.actorOf(
31-
SPRING_EXTENSION_PROVIDER.get(system)
32-
.props("greetingActor"), "greeter");
30+
ActorRef greeter = system.actorOf(SPRING_EXTENSION_PROVIDER.get(system).props("greetingActor"), "greeter");
3331

3432
FiniteDuration duration = FiniteDuration.create(1, TimeUnit.SECONDS);
3533
Timeout timeout = Timeout.durationToTimeout(duration);

‎spring-all/src/main/java/org/baeldung/caching/example/AbstractService.java‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,5 +72,5 @@ public String getAddress4(final Customer customer) {
7272
public String getAddress5(final Customer customer) {
7373
return customer.getAddress();
7474
}
75-
75+
7676
}

‎spring-all/src/main/java/org/baeldung/controller/config/StudentControllerConfig.java‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -11,21 +11,21 @@
1111
import org.springframework.web.servlet.DispatcherServlet;
1212

1313
public class StudentControllerConfig implements WebApplicationInitializer {
14-
15-
@Override
16-
public void onStartup(ServletContext sc) throws ServletException {
17-
AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext();
18-
root.register(WebConfig.class);
1914

20-
root.setServletContext(sc);
15+
@Override
16+
public void onStartup(ServletContext sc) throws ServletException {
17+
AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext();
18+
root.register(WebConfig.class);
2119

22-
// Manages the lifecycle of the root application context
23-
sc.addListener(new ContextLoaderListener(root));
20+
root.setServletContext(sc);
2421

25-
DispatcherServlet dv = new DispatcherServlet(new GenericWebApplicationContext());
22+
// Manages the lifecycle of the root application context
23+
sc.addListener(new ContextLoaderListener(root));
2624

27-
ServletRegistration.Dynamic appServlet = sc.addServlet("test-mvc", dv);
28-
appServlet.setLoadOnStartup(1);
29-
appServlet.addMapping("/test/*");
30-
}
25+
DispatcherServlet dv = new DispatcherServlet(new GenericWebApplicationContext());
26+
27+
ServletRegistration.Dynamic appServlet = sc.addServlet("test-mvc", dv);
28+
appServlet.setLoadOnStartup(1);
29+
appServlet.addMapping("/test/*");
30+
}
3131
}

‎spring-all/src/main/java/org/baeldung/controller/config/WebConfig.java‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@
1111

1212
@Configuration
1313
@EnableWebMvc
14-
@ComponentScan(basePackages= {"org.baeldung.controller.controller","org.baeldung.controller.config" })
14+
@ComponentScan(basePackages = { "org.baeldung.controller.controller", "org.baeldung.controller.config" })
1515
public class WebConfig extends WebMvcConfigurerAdapter {
1616
@Override
1717
public void configureDefaultServletHandling(DefaultServletHandlerConfigurer configurer) {
1818
configurer.enable();
1919
}
20-
20+
2121
@Bean
2222
public ViewResolver viewResolver() {
2323
InternalResourceViewResolver bean = new InternalResourceViewResolver();

‎spring-all/src/main/java/org/baeldung/controller/controller/RestController.java‎

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@
77
import org.springframework.web.bind.annotation.ResponseBody;
88

99
@Controller
10-
public class RestController{
10+
public class RestController {
1111

12-
@GetMapping(value="/student/{studentId}")
13-
public @ResponseBody Student getTestData(@PathVariable Integer studentId) {
14-
Student student = new Student();
15-
student.setName("Peter");
16-
student.setId(studentId);
12+
@GetMapping(value = "/student/{studentId}")
13+
public @ResponseBody Student getTestData(@PathVariable Integer studentId) {
14+
Student student = new Student();
15+
student.setName("Peter");
16+
student.setId(studentId);
1717

18-
return student;
18+
return student;
1919

20-
}
20+
}
2121
}
Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,33 @@
11
package org.baeldung.controller.student;
22

33
public class Student {
4-
private String name;
5-
6-
private int id;
7-
8-
public String getName() {
9-
return name;
10-
}
11-
12-
public void setName(String name) {
13-
this.name = name;
14-
}
15-
16-
public int getId() {
17-
return id;
18-
}
19-
20-
public void setId(int id) {
21-
this.id = id;
22-
}
23-
24-
@Override
25-
public int hashCode(){
26-
return this.id;
27-
}
28-
29-
@Override
30-
public boolean equals(Object obj){
31-
return this.name.equals(((Student)obj).getName());
32-
}
4+
private String name;
5+
6+
private int id;
7+
8+
public String getName() {
9+
return name;
10+
}
11+
12+
public void setName(String name) {
13+
this.name = name;
14+
}
15+
16+
public int getId() {
17+
return id;
18+
}
19+
20+
public void setId(int id) {
21+
this.id = id;
22+
}
23+
24+
@Override
25+
public int hashCode() {
26+
return this.id;
27+
}
28+
29+
@Override
30+
public boolean equals(Object obj) {
31+
return this.name.equals(((Student) obj).getName());
32+
}
3333
}

‎spring-all/src/main/java/org/baeldung/properties/spring/PropertiesWithPlaceHolderConfigurer.java‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ public PropertiesWithPlaceHolderConfigurer() {
1111
super();
1212
}
1313

14-
1514
@Bean
1615
public PropertyPlaceholderConfigurer propertyConfigurer() {
1716
final PropertyPlaceholderConfigurer props = new PropertyPlaceholderConfigurer();

‎spring-all/src/main/java/org/baeldung/scopes/HelloMessageGenerator.java‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,14 @@
22

33
public class HelloMessageGenerator {
44

5-
private String message;
5+
private String message;
66

7-
public String getMessage() {
8-
return message;
9-
}
7+
public String getMessage() {
8+
return message;
9+
}
1010

11-
public void setMessage(final String message) {
12-
this.message = message;
13-
}
11+
public void setMessage(final String message) {
12+
this.message = message;
13+
}
1414

1515
}
Lines changed: 17 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
package org.baeldung.scopes;
22

33
public class Person {
4-
private String name;
5-
private int age;
4+
private String name;
5+
private int age;
66

7-
public Person() {
8-
}
7+
public Person() {
8+
}
99

10-
public Person(final String name, final int age) {
11-
this.name = name;
12-
}
10+
public Person(final String name, final int age) {
11+
this.name = name;
12+
}
1313

14-
public String getName() {
15-
return name;
16-
}
14+
public String getName() {
15+
return name;
16+
}
1717

18-
public void setName(final String name) {
19-
this.name = name;
20-
}
18+
public void setName(final String name) {
19+
this.name = name;
20+
}
2121

22-
@Override
23-
public String toString() {
24-
return "Person [name=" + name + "]";
25-
}
22+
@Override
23+
public String toString() {
24+
return "Person [name=" + name + "]";
25+
}
2626

2727
}

0 commit comments

Comments
 (0)