Skip to content

Commit

Permalink
Thank You for Choosing to Learn from in28Minutes
Browse files Browse the repository at this point in the history
  • Loading branch information
in28minutes committed May 25, 2021
1 parent d467683 commit 998e4e8
Show file tree
Hide file tree
Showing 8 changed files with 1,176 additions and 69 deletions.
1,149 changes: 1,149 additions & 0 deletions 02.restful-web-services/2.5.0-UPGRADE.md

Large diffs are not rendered by default.

13 changes: 10 additions & 3 deletions 02.restful-web-services/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.3.1.RELEASE</version>
<version>2.5.0</version>
<relativePath /> <!-- lookup parent from repository -->
</parent>

Expand Down Expand Up @@ -55,7 +55,7 @@

<dependency>
<groupId>org.springframework.data</groupId>
<artifactId>spring-data-rest-hal-browser</artifactId>
<artifactId>spring-data-rest-hal-explorer</artifactId>
</dependency>


Expand All @@ -64,7 +64,7 @@
<artifactId>spring-boot-starter-hateoas</artifactId>
</dependency>

<dependency>
<!-- <dependency>
<groupId>com.fasterxml.jackson.dataformat</groupId>
<artifactId>jackson-dataformat-xml</artifactId>
</dependency>
Expand All @@ -74,6 +74,13 @@
<artifactId>springfox-boot-starter</artifactId>
<version>3.0.0</version>
</dependency>
-->

<dependency>
<groupId>org.springdoc</groupId>
<artifactId>springdoc-openapi-ui</artifactId>
<version>1.5.9</version>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,12 +1,7 @@
package com.in28minutes.rest.webservices.restfulwebservices;

import java.util.Locale;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import org.springframework.web.servlet.LocaleResolver;
import org.springframework.web.servlet.i18n.AcceptHeaderLocaleResolver;

@SpringBootApplication
public class RestfulWebServicesApplication {
Expand All @@ -15,10 +10,10 @@ public static void main(String[] args) {
SpringApplication.run(RestfulWebServicesApplication.class, args);
}

@Bean
public LocaleResolver localeResolver() {
AcceptHeaderLocaleResolver localeResolver = new AcceptHeaderLocaleResolver();
localeResolver.setDefaultLocale(Locale.US);
return localeResolver;
}
// @Bean
// public LocaleResolver localeResolver() {
// AcceptHeaderLocaleResolver localeResolver = new AcceptHeaderLocaleResolver();
// localeResolver.setDefaultLocale(Locale.US);
// return localeResolver;
// }
}

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@
import javax.validation.constraints.Past;
import javax.validation.constraints.Size;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;

@ApiModel(description="All details about the user.")
//@ApiModel(description="All details about the user.")
@Entity
public class User {

Expand All @@ -22,11 +19,11 @@ public class User {
private Integer id;

@Size(min=2, message="Name should have atleast 2 characters")
@ApiModelProperty(notes="Name should have atleast 2 characters")
//@ApiModelProperty(notes="Name should have atleast 2 characters")
private String name;

@Past
@ApiModelProperty(notes="Birth date should be in the past")
//@ApiModelProperty(notes="Birth date should be in the past")
private Date birthDate;

@OneToMany(mappedBy="user")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
//@RestController
public class PersonVersioningController {

@GetMapping("v1/person")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,5 @@ spring.security.user.password=password
spring.jpa.show-sql=true
spring.h2.console.enabled=true
spring.datasource.url=jdbc:h2:mem:testdb
spring.data.jpa.repositories.bootstrap-mode=default
#spring.data.jpa.repositories.bootstrap-mode=default
spring.jpa.defer-datasource-initialization=true
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
package com.in28minutes.rest.webservices.restfulwebservices;

import org.junit.Test;
import org.junit.runner.RunWith;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.junit4.SpringRunner;

@RunWith(SpringRunner.class)
@SpringBootTest
public class RestfulWebServicesApplicationTests {
class RestfulWebServicesApplicationTests {

@Test
public void contextLoads() {
}
@Test
void contextLoads() {
}

}

0 comments on commit 998e4e8

Please sign in to comment.