[JAVA-28961] Upgrade to spring-boot-data-2 module to Spring Boot 3 (#15620)
This commit is contained in:
parent
b6c126b183
commit
790334d094
|
@ -6,9 +6,10 @@
|
|||
<artifactId>spring-boot-data-2</artifactId>
|
||||
|
||||
<parent>
|
||||
<groupId>com.baeldung.spring-boot-modules</groupId>
|
||||
<artifactId>spring-boot-modules</artifactId>
|
||||
<version>1.0.0-SNAPSHOT</version>
|
||||
<groupId>com.baeldung</groupId>
|
||||
<artifactId>parent-boot-3</artifactId>
|
||||
<version>0.0.1-SNAPSHOT</version>
|
||||
<relativePath>../../parent-boot-3</relativePath>
|
||||
</parent>
|
||||
|
||||
<dependencies>
|
||||
|
@ -42,6 +43,7 @@
|
|||
|
||||
<properties>
|
||||
<javers.version>6.6.5</javers.version>
|
||||
<start-class> com.baeldung.boot.bootstrapmode.Application</start-class>
|
||||
</properties>
|
||||
|
||||
</project>
|
|
@ -1,9 +1,9 @@
|
|||
package com.baeldung.boot.bootstrapmode.domain;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class Todo {
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.baeldung.boot.readonlyrepository;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class Book
|
||||
|
|
|
@ -10,8 +10,8 @@ import java.lang.annotation.Retention;
|
|||
import java.lang.annotation.RetentionPolicy;
|
||||
import java.lang.annotation.Target;
|
||||
|
||||
import javax.validation.Constraint;
|
||||
import javax.validation.Payload;
|
||||
import jakarta.validation.Constraint;
|
||||
import jakarta.validation.Payload;
|
||||
|
||||
@Constraint(validatedBy = { ContactInfoValidator.class })
|
||||
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER })
|
||||
|
|
|
@ -9,8 +9,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
|||
import org.springframework.beans.factory.annotation.Value;
|
||||
import org.thymeleaf.util.StringUtils;
|
||||
|
||||
import javax.validation.ConstraintValidator;
|
||||
import javax.validation.ConstraintValidatorContext;
|
||||
import jakarta.validation.ConstraintValidator;
|
||||
import jakarta.validation.ConstraintValidatorContext;
|
||||
import java.util.regex.Pattern;
|
||||
|
||||
public class ContactInfoValidator implements ConstraintValidator<ContactInfo, String> {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.dynamicvalidation;
|
||||
|
||||
import javax.annotation.security.RolesAllowed;
|
||||
import jakarta.annotation.security.RolesAllowed;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.dynamicvalidation.config;
|
||||
|
||||
import javax.validation.Valid;
|
||||
import jakarta.validation.Valid;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package com.baeldung.dynamicvalidation.model;
|
||||
|
||||
import javax.persistence.Column;
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.Id;
|
||||
import jakarta.persistence.Column;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.Id;
|
||||
|
||||
@Entity
|
||||
public class ContactInfoExpression {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
package com.baeldung.dynamicvalidation.model;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
||||
import javax.persistence.GenerationType;
|
||||
import javax.persistence.Id;
|
||||
import javax.validation.constraints.NotNull;
|
||||
import jakarta.persistence.Entity;
|
||||
import jakarta.persistence.GeneratedValue;
|
||||
import jakarta.persistence.GenerationType;
|
||||
import jakarta.persistence.Id;
|
||||
import jakarta.validation.constraints.NotNull;
|
||||
|
||||
import com.baeldung.dynamicvalidation.ContactInfo;
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.javers.domain;
|
||||
|
||||
import javax.persistence.Embeddable;
|
||||
import jakarta.persistence.Embeddable;
|
||||
|
||||
@Embeddable
|
||||
public class Address {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.javers.domain;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
|
||||
@Entity
|
||||
public class Product {
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
package com.baeldung.javers.domain;
|
||||
|
||||
import javax.persistence.*;
|
||||
import jakarta.persistence.*;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
|
@ -17,13 +17,13 @@ import com.baeldung.propertyeditor.exotictype.model.ExoticType;
|
|||
public class PropertyEditorRestController {
|
||||
|
||||
@GetMapping(value = "/credit-card/{card-no}",
|
||||
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
||||
produces = MediaType.APPLICATION_JSON_VALUE )
|
||||
public CreditCard parseCreditCardNumber(@PathVariable("card-no") CreditCard creditCard) {
|
||||
return creditCard;
|
||||
}
|
||||
|
||||
@GetMapping(value = "/exotic-type/{value}",
|
||||
produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
|
||||
produces = MediaType.APPLICATION_JSON_VALUE )
|
||||
public ExoticType parseExoticType(@PathVariable("value") ExoticType exoticType) {
|
||||
return exoticType;
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ public class CreditCardEditor extends PropertyEditorSupport {
|
|||
|
||||
@Override
|
||||
public void setAsText(String text) throws IllegalArgumentException {
|
||||
if (StringUtils.isEmpty(text)) {
|
||||
if (!StringUtils.hasLength(text)) {
|
||||
setValue(null);
|
||||
} else {
|
||||
CreditCard creditCard = new CreditCard();
|
||||
|
|
Loading…
Reference in New Issue