Merge pull request #8409 from kwoyke/BAEL-20262
BAEL-20262: Migrate spring-exceptions, javaxval, spring-scheduling and spring-core-2 modules to the com.baeldung package
This commit is contained in:
commit
9d951b4a0c
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.beanvalidation;
|
package com.baeldung.javaxval.beanvalidation;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.bigdecimal;
|
package com.baeldung.javaxval.bigdecimal;
|
||||||
|
|
||||||
import java.math.BigDecimal;
|
import java.math.BigDecimal;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.container.validation;
|
package com.baeldung.javaxval.container.validation;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.container.validation;
|
package com.baeldung.javaxval.container.validation;
|
||||||
|
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.container.validation;
|
package com.baeldung.javaxval.container.validation;
|
||||||
|
|
||||||
public class Profile {
|
public class Profile {
|
||||||
private String companyName;
|
private String companyName;
|
|
@ -1,10 +1,10 @@
|
||||||
package org.baeldung.javaxval.container.validation.valueextractors;
|
package com.baeldung.javaxval.container.validation.valueextractors;
|
||||||
|
|
||||||
import javax.validation.valueextraction.ExtractedValue;
|
import javax.validation.valueextraction.ExtractedValue;
|
||||||
import javax.validation.valueextraction.UnwrapByDefault;
|
import javax.validation.valueextraction.UnwrapByDefault;
|
||||||
import javax.validation.valueextraction.ValueExtractor;
|
import javax.validation.valueextraction.ValueExtractor;
|
||||||
|
|
||||||
import org.baeldung.javaxval.container.validation.Profile;
|
import com.baeldung.javaxval.container.validation.Profile;
|
||||||
|
|
||||||
@UnwrapByDefault
|
@UnwrapByDefault
|
||||||
public class ProfileValueExtractor implements ValueExtractor<@ExtractedValue(type = String.class) Profile> {
|
public class ProfileValueExtractor implements ValueExtractor<@ExtractedValue(type = String.class) Profile> {
|
|
@ -1,12 +1,12 @@
|
||||||
package org.baeldung.javaxval.enums;
|
package com.baeldung.javaxval.enums;
|
||||||
|
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
|
|
||||||
import javax.validation.ConstraintValidator;
|
import javax.validation.ConstraintValidator;
|
||||||
import javax.validation.ConstraintValidatorContext;
|
import javax.validation.ConstraintValidatorContext;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.constraints.CustomerTypeSubset;
|
import com.baeldung.javaxval.enums.constraints.CustomerTypeSubset;
|
||||||
import org.baeldung.javaxval.enums.demo.CustomerType;
|
import com.baeldung.javaxval.enums.demo.CustomerType;
|
||||||
|
|
||||||
public class CustomerTypeSubSetValidator implements ConstraintValidator<CustomerTypeSubset, CustomerType> {
|
public class CustomerTypeSubSetValidator implements ConstraintValidator<CustomerTypeSubset, CustomerType> {
|
||||||
private CustomerType[] subset;
|
private CustomerType[] subset;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.enums;
|
package com.baeldung.javaxval.enums;
|
||||||
|
|
||||||
import java.util.regex.Matcher;
|
import java.util.regex.Matcher;
|
||||||
import java.util.regex.Pattern;
|
import java.util.regex.Pattern;
|
||||||
|
@ -7,7 +7,7 @@ import java.util.regex.PatternSyntaxException;
|
||||||
import javax.validation.ConstraintValidator;
|
import javax.validation.ConstraintValidator;
|
||||||
import javax.validation.ConstraintValidatorContext;
|
import javax.validation.ConstraintValidatorContext;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.constraints.EnumNamePattern;
|
import com.baeldung.javaxval.enums.constraints.EnumNamePattern;
|
||||||
|
|
||||||
public class EnumNamePatternValidator implements ConstraintValidator<EnumNamePattern, Enum<?>> {
|
public class EnumNamePatternValidator implements ConstraintValidator<EnumNamePattern, Enum<?>> {
|
||||||
private Pattern pattern;
|
private Pattern pattern;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.enums;
|
package com.baeldung.javaxval.enums;
|
||||||
|
|
||||||
import java.lang.annotation.Annotation;
|
import java.lang.annotation.Annotation;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
|
@ -1,7 +1,7 @@
|
||||||
package org.baeldung.javaxval.enums;
|
package com.baeldung.javaxval.enums;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.constraints.CustomerTypeSubset;
|
import com.baeldung.javaxval.enums.constraints.CustomerTypeSubset;
|
||||||
import org.baeldung.javaxval.enums.demo.CustomerType;
|
import com.baeldung.javaxval.enums.demo.CustomerType;
|
||||||
|
|
||||||
public class InheritedCustomerTypeSubSetValidator extends EnumSubSetValidator<CustomerTypeSubset, CustomerType> {
|
public class InheritedCustomerTypeSubSetValidator extends EnumSubSetValidator<CustomerTypeSubset, CustomerType> {
|
||||||
@Override
|
@Override
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.enums;
|
package com.baeldung.javaxval.enums;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
@ -7,7 +7,7 @@ import java.util.stream.Stream;
|
||||||
import javax.validation.ConstraintValidator;
|
import javax.validation.ConstraintValidator;
|
||||||
import javax.validation.ConstraintValidatorContext;
|
import javax.validation.ConstraintValidatorContext;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.constraints.ValueOfEnum;
|
import com.baeldung.javaxval.enums.constraints.ValueOfEnum;
|
||||||
|
|
||||||
public class ValueOfEnumValidator implements ConstraintValidator<ValueOfEnum, CharSequence> {
|
public class ValueOfEnumValidator implements ConstraintValidator<ValueOfEnum, CharSequence> {
|
||||||
private List<String> acceptedValues;
|
private List<String> acceptedValues;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.enums.constraints;
|
package com.baeldung.javaxval.enums.constraints;
|
||||||
|
|
||||||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
||||||
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
||||||
|
@ -15,8 +15,8 @@ import java.lang.annotation.Target;
|
||||||
import javax.validation.Constraint;
|
import javax.validation.Constraint;
|
||||||
import javax.validation.Payload;
|
import javax.validation.Payload;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.CustomerTypeSubSetValidator;
|
import com.baeldung.javaxval.enums.CustomerTypeSubSetValidator;
|
||||||
import org.baeldung.javaxval.enums.demo.CustomerType;
|
import com.baeldung.javaxval.enums.demo.CustomerType;
|
||||||
|
|
||||||
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
|
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.enums.constraints;
|
package com.baeldung.javaxval.enums.constraints;
|
||||||
|
|
||||||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
||||||
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
||||||
|
@ -15,7 +15,7 @@ import java.lang.annotation.Target;
|
||||||
import javax.validation.Constraint;
|
import javax.validation.Constraint;
|
||||||
import javax.validation.Payload;
|
import javax.validation.Payload;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.EnumNamePatternValidator;
|
import com.baeldung.javaxval.enums.EnumNamePatternValidator;
|
||||||
|
|
||||||
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
|
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.enums.constraints;
|
package com.baeldung.javaxval.enums.constraints;
|
||||||
|
|
||||||
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
import static java.lang.annotation.ElementType.ANNOTATION_TYPE;
|
||||||
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
||||||
|
@ -15,7 +15,7 @@ import java.lang.annotation.Target;
|
||||||
import javax.validation.Constraint;
|
import javax.validation.Constraint;
|
||||||
import javax.validation.Payload;
|
import javax.validation.Payload;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.ValueOfEnumValidator;
|
import com.baeldung.javaxval.enums.ValueOfEnumValidator;
|
||||||
|
|
||||||
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
|
@Target({ METHOD, FIELD, ANNOTATION_TYPE, CONSTRUCTOR, PARAMETER, TYPE_USE })
|
||||||
@Retention(RUNTIME)
|
@Retention(RUNTIME)
|
|
@ -1,10 +1,10 @@
|
||||||
package org.baeldung.javaxval.enums.demo;
|
package com.baeldung.javaxval.enums.demo;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.constraints.CustomerTypeSubset;
|
import com.baeldung.javaxval.enums.constraints.CustomerTypeSubset;
|
||||||
import org.baeldung.javaxval.enums.constraints.EnumNamePattern;
|
import com.baeldung.javaxval.enums.constraints.EnumNamePattern;
|
||||||
import org.baeldung.javaxval.enums.constraints.ValueOfEnum;
|
import com.baeldung.javaxval.enums.constraints.ValueOfEnum;
|
||||||
|
|
||||||
public class Customer {
|
public class Customer {
|
||||||
@ValueOfEnum(enumClass = CustomerType.class)
|
@ValueOfEnum(enumClass = CustomerType.class)
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.enums.demo;
|
package com.baeldung.javaxval.enums.demo;
|
||||||
|
|
||||||
public enum CustomerType {
|
public enum CustomerType {
|
||||||
NEW, OLD, DEFAULT
|
NEW, OLD, DEFAULT
|
|
@ -1,9 +1,9 @@
|
||||||
package org.baeldung.javaxval.javabeanconstraints.application;
|
package com.baeldung.javaxval.javabeanconstraints.application;
|
||||||
|
|
||||||
import javax.validation.Validation;
|
import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.javabeanconstraints.entities.UserNotBlank;
|
import com.baeldung.javaxval.javabeanconstraints.entities.UserNotBlank;
|
||||||
|
|
||||||
public class Application {
|
public class Application {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.javabeanconstraints.entities;
|
package com.baeldung.javaxval.javabeanconstraints.entities;
|
||||||
|
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.javabeanconstraints.entities;
|
package com.baeldung.javaxval.javabeanconstraints.entities;
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
import javax.validation.constraints.NotEmpty;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.javabeanconstraints.entities;
|
package com.baeldung.javaxval.javabeanconstraints.entities;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.messageinterpolator;
|
package com.baeldung.javaxval.messageinterpolator;
|
||||||
|
|
||||||
import javax.validation.constraints.Email;
|
import javax.validation.constraints.Email;
|
||||||
import javax.validation.constraints.Min;
|
import javax.validation.constraints.Min;
|
|
@ -1,9 +1,9 @@
|
||||||
package org.baeldung.javaxval.methodvalidation;
|
package com.baeldung.javaxval.methodvalidation;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
import org.baeldung.javaxval.methodvalidation.model.Customer;
|
import com.baeldung.javaxval.methodvalidation.model.Customer;
|
||||||
import org.baeldung.javaxval.methodvalidation.model.Reservation;
|
import com.baeldung.javaxval.methodvalidation.model.Reservation;
|
||||||
import org.springframework.beans.factory.config.BeanDefinition;
|
import org.springframework.beans.factory.config.BeanDefinition;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
@ -12,7 +12,7 @@ import org.springframework.context.annotation.Scope;
|
||||||
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
|
import org.springframework.validation.beanvalidation.MethodValidationPostProcessor;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan({ "org.baeldung.javaxval.methodvalidation.model" })
|
@ComponentScan({ "com.baeldung.javaxval.methodvalidation.model" })
|
||||||
public class MethodValidationConfig {
|
public class MethodValidationConfig {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.methodvalidation.constraints;
|
package com.baeldung.javaxval.methodvalidation.constraints;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.methodvalidation.constraints;
|
package com.baeldung.javaxval.methodvalidation.constraints;
|
||||||
|
|
||||||
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
||||||
import static java.lang.annotation.ElementType.METHOD;
|
import static java.lang.annotation.ElementType.METHOD;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.methodvalidation.constraints;
|
package com.baeldung.javaxval.methodvalidation.constraints;
|
||||||
|
|
||||||
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
import static java.lang.annotation.ElementType.CONSTRUCTOR;
|
||||||
import static java.lang.annotation.ElementType.METHOD;
|
import static java.lang.annotation.ElementType.METHOD;
|
|
@ -1,11 +1,11 @@
|
||||||
package org.baeldung.javaxval.methodvalidation.constraints;
|
package com.baeldung.javaxval.methodvalidation.constraints;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
import javax.validation.ConstraintValidator;
|
import javax.validation.ConstraintValidator;
|
||||||
import javax.validation.ConstraintValidatorContext;
|
import javax.validation.ConstraintValidatorContext;
|
||||||
|
|
||||||
import org.baeldung.javaxval.methodvalidation.model.Reservation;
|
import com.baeldung.javaxval.methodvalidation.model.Reservation;
|
||||||
|
|
||||||
public class ValidReservationValidator implements ConstraintValidator<ValidReservation, Reservation> {
|
public class ValidReservationValidator implements ConstraintValidator<ValidReservation, Reservation> {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.methodvalidation.model;
|
package com.baeldung.javaxval.methodvalidation.model;
|
||||||
|
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
|
@ -1,12 +1,12 @@
|
||||||
package org.baeldung.javaxval.methodvalidation.model;
|
package com.baeldung.javaxval.methodvalidation.model;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import javax.validation.constraints.Positive;
|
import javax.validation.constraints.Positive;
|
||||||
|
|
||||||
import org.baeldung.javaxval.methodvalidation.constraints.ConsistentDateParameters;
|
import com.baeldung.javaxval.methodvalidation.constraints.ValidReservation;
|
||||||
import org.baeldung.javaxval.methodvalidation.constraints.ValidReservation;
|
import com.baeldung.javaxval.methodvalidation.constraints.ConsistentDateParameters;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
|
|
||||||
@Validated
|
@Validated
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.methodvalidation.model;
|
package com.baeldung.javaxval.methodvalidation.model;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
@ -9,7 +9,7 @@ import javax.validation.constraints.Min;
|
||||||
import javax.validation.constraints.NotNull;
|
import javax.validation.constraints.NotNull;
|
||||||
import javax.validation.constraints.Size;
|
import javax.validation.constraints.Size;
|
||||||
|
|
||||||
import org.baeldung.javaxval.methodvalidation.constraints.ConsistentDateParameters;
|
import com.baeldung.javaxval.methodvalidation.constraints.ConsistentDateParameters;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.stereotype.Controller;
|
import org.springframework.stereotype.Controller;
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.baeldung.javaxval.validationgroup;
|
||||||
|
|
||||||
|
public interface AdvanceInfo {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.baeldung.javaxval.validationgroup;
|
||||||
|
|
||||||
|
public interface BasicInfo {
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.validationgroup;
|
package com.baeldung.javaxval.validationgroup;
|
||||||
|
|
||||||
import javax.validation.GroupSequence;
|
import javax.validation.GroupSequence;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.validationgroup;
|
package com.baeldung.javaxval.validationgroup;
|
||||||
|
|
||||||
import javax.validation.constraints.Email;
|
import javax.validation.constraints.Email;
|
||||||
import javax.validation.constraints.NotBlank;
|
import javax.validation.constraints.NotBlank;
|
|
@ -1,5 +0,0 @@
|
||||||
package org.baeldung.javaxval.validationgroup;
|
|
||||||
|
|
||||||
public interface AdvanceInfo {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1,5 +0,0 @@
|
||||||
package org.baeldung.javaxval.validationgroup;
|
|
||||||
|
|
||||||
public interface BasicInfo {
|
|
||||||
|
|
||||||
}
|
|
|
@ -1 +1 @@
|
||||||
org.baeldung.javaxval.container.validation.valueextractors.ProfileValueExtractor
|
com.baeldung.javaxval.container.validation.valueextractors.ProfileValueExtractor
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval;
|
package com.baeldung.javaxval;
|
||||||
|
|
||||||
import java.util.Locale;
|
import java.util.Locale;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.beanvalidation;
|
package com.baeldung.javaxval.beanvalidation;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.bigdecimal;
|
package com.baeldung.javaxval.bigdecimal;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validation;
|
import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.LocaleAwareUnitTest;
|
import com.baeldung.javaxval.LocaleAwareUnitTest;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.container.validation;
|
package com.baeldung.javaxval.container.validation;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
import javax.validation.ValidatorFactory;
|
import javax.validation.ValidatorFactory;
|
||||||
|
|
||||||
import org.baeldung.javaxval.container.validation.valueextractors.ProfileValueExtractor;
|
import com.baeldung.javaxval.container.validation.valueextractors.ProfileValueExtractor;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.enums;
|
package com.baeldung.javaxval.enums;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -8,9 +8,9 @@ import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validation;
|
import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.demo.Customer;
|
import com.baeldung.javaxval.enums.demo.CustomerUnitTest;
|
||||||
import org.baeldung.javaxval.enums.demo.CustomerType;
|
import com.baeldung.javaxval.enums.demo.Customer;
|
||||||
import org.baeldung.javaxval.enums.demo.CustomerUnitTest;
|
import com.baeldung.javaxval.enums.demo.CustomerType;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,8 +1,8 @@
|
||||||
package org.baeldung.javaxval.enums;
|
package com.baeldung.javaxval.enums;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
import static org.baeldung.javaxval.enums.demo.CustomerType.DEFAULT;
|
import static com.baeldung.javaxval.enums.demo.CustomerType.DEFAULT;
|
||||||
import static org.baeldung.javaxval.enums.demo.CustomerType.OLD;
|
import static com.baeldung.javaxval.enums.demo.CustomerType.OLD;
|
||||||
|
|
||||||
import java.util.Set;
|
import java.util.Set;
|
||||||
|
|
||||||
|
@ -10,8 +10,8 @@ import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validation;
|
import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.demo.Customer;
|
import com.baeldung.javaxval.enums.demo.CustomerUnitTest;
|
||||||
import org.baeldung.javaxval.enums.demo.CustomerUnitTest;
|
import com.baeldung.javaxval.enums.demo.Customer;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.enums;
|
package com.baeldung.javaxval.enums;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -8,8 +8,8 @@ import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validation;
|
import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.enums.demo.Customer;
|
import com.baeldung.javaxval.enums.demo.CustomerUnitTest;
|
||||||
import org.baeldung.javaxval.enums.demo.CustomerUnitTest;
|
import com.baeldung.javaxval.enums.demo.Customer;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -47,6 +47,6 @@ public class ValueOfEnumValidatorUnitTest {
|
||||||
assertThat(violations.size()).isEqualTo(1);
|
assertThat(violations.size()).isEqualTo(1);
|
||||||
|
|
||||||
assertThat(violations).anyMatch(CustomerUnitTest.havingPropertyPath("customerTypeString")
|
assertThat(violations).anyMatch(CustomerUnitTest.havingPropertyPath("customerTypeString")
|
||||||
.and(CustomerUnitTest.havingMessage("must be any of enum class org.baeldung.javaxval.enums.demo.CustomerType")));
|
.and(CustomerUnitTest.havingMessage("must be any of enum class com.baeldung.javaxval.enums.demo.CustomerType")));
|
||||||
}
|
}
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.enums.demo;
|
package com.baeldung.javaxval.enums.demo;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -9,7 +9,7 @@ import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validation;
|
import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.LocaleAwareUnitTest;
|
import com.baeldung.javaxval.LocaleAwareUnitTest;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
|
@ -50,7 +50,7 @@ public class CustomerUnitTest extends LocaleAwareUnitTest {
|
||||||
Set<ConstraintViolation<Customer>> violations = validator.validate(customer);
|
Set<ConstraintViolation<Customer>> violations = validator.validate(customer);
|
||||||
assertThat(violations.size()).isEqualTo(3);
|
assertThat(violations.size()).isEqualTo(3);
|
||||||
|
|
||||||
assertThat(violations).anyMatch(havingPropertyPath("customerTypeString").and(havingMessage("must be any of enum class org.baeldung.javaxval.enums.demo.CustomerType")));
|
assertThat(violations).anyMatch(havingPropertyPath("customerTypeString").and(havingMessage("must be any of enum class com.baeldung.javaxval.enums.demo.CustomerType")));
|
||||||
assertThat(violations).anyMatch(havingPropertyPath("customerTypeOfSubset").and(havingMessage("must be any of [NEW, OLD]")));
|
assertThat(violations).anyMatch(havingPropertyPath("customerTypeOfSubset").and(havingMessage("must be any of [NEW, OLD]")));
|
||||||
assertThat(violations).anyMatch(havingPropertyPath("customerTypeMatchesPattern").and(havingMessage("must match \"NEW|DEFAULT\"")));
|
assertThat(violations).anyMatch(havingPropertyPath("customerTypeMatchesPattern").and(havingMessage("must match \"NEW|DEFAULT\"")));
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.javabeanconstraints.test;
|
package com.baeldung.javaxval.javabeanconstraints.test;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validation;
|
import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.javabeanconstraints.entities.UserNotBlank;
|
import com.baeldung.javaxval.javabeanconstraints.entities.UserNotBlank;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.javabeanconstraints.test;
|
package com.baeldung.javaxval.javabeanconstraints.test;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validation;
|
import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.javabeanconstraints.entities.UserNotEmpty;
|
import com.baeldung.javaxval.javabeanconstraints.entities.UserNotEmpty;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.javabeanconstraints.test;
|
package com.baeldung.javaxval.javabeanconstraints.test;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validation;
|
import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.javabeanconstraints.entities.UserNotNull;
|
import com.baeldung.javaxval.javabeanconstraints.entities.UserNotNull;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.messageinterpolator;
|
package com.baeldung.javaxval.messageinterpolator;
|
||||||
|
|
||||||
import static org.junit.jupiter.api.Assertions.assertEquals;
|
import static org.junit.jupiter.api.Assertions.assertEquals;
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
package org.baeldung.javaxval.methodvalidation;
|
package com.baeldung.javaxval.methodvalidation;
|
||||||
|
|
||||||
import java.time.LocalDate;
|
import java.time.LocalDate;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import javax.validation.ConstraintViolationException;
|
import javax.validation.ConstraintViolationException;
|
||||||
|
|
||||||
import org.baeldung.javaxval.methodvalidation.model.Customer;
|
import com.baeldung.javaxval.methodvalidation.model.Customer;
|
||||||
import org.baeldung.javaxval.methodvalidation.model.Reservation;
|
import com.baeldung.javaxval.methodvalidation.model.Reservation;
|
||||||
import org.baeldung.javaxval.methodvalidation.model.ReservationManagement;
|
import com.baeldung.javaxval.methodvalidation.model.ReservationManagement;
|
||||||
import org.junit.Rule;
|
import org.junit.Rule;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
import org.junit.rules.ExpectedException;
|
import org.junit.rules.ExpectedException;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.methodvalidation;
|
package com.baeldung.javaxval.methodvalidation;
|
||||||
|
|
||||||
import static org.junit.Assert.assertEquals;
|
import static org.junit.Assert.assertEquals;
|
||||||
|
|
||||||
|
@ -13,9 +13,9 @@ import javax.validation.Validation;
|
||||||
import javax.validation.ValidatorFactory;
|
import javax.validation.ValidatorFactory;
|
||||||
import javax.validation.executable.ExecutableValidator;
|
import javax.validation.executable.ExecutableValidator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.methodvalidation.model.Customer;
|
import com.baeldung.javaxval.methodvalidation.model.Customer;
|
||||||
import org.baeldung.javaxval.methodvalidation.model.Reservation;
|
import com.baeldung.javaxval.methodvalidation.model.Reservation;
|
||||||
import org.baeldung.javaxval.methodvalidation.model.ReservationManagement;
|
import com.baeldung.javaxval.methodvalidation.model.ReservationManagement;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.javaxval.validationgroup;
|
package com.baeldung.javaxval.validationgroup;
|
||||||
|
|
||||||
import static org.assertj.core.api.Assertions.assertThat;
|
import static org.assertj.core.api.Assertions.assertThat;
|
||||||
|
|
||||||
|
@ -8,7 +8,7 @@ import javax.validation.ConstraintViolation;
|
||||||
import javax.validation.Validation;
|
import javax.validation.Validation;
|
||||||
import javax.validation.Validator;
|
import javax.validation.Validator;
|
||||||
|
|
||||||
import org.baeldung.javaxval.LocaleAwareUnitTest;
|
import com.baeldung.javaxval.LocaleAwareUnitTest;
|
||||||
import org.junit.BeforeClass;
|
import org.junit.BeforeClass;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
|
@ -201,7 +201,7 @@
|
||||||
</profiles>
|
</profiles>
|
||||||
|
|
||||||
<properties>
|
<properties>
|
||||||
<start-class>org.baeldung.sample.App</start-class>
|
<start-class>com.baeldung.sample.App</start-class>
|
||||||
<!-- Spring -->
|
<!-- Spring -->
|
||||||
<org.springframework.version>5.0.6.RELEASE</org.springframework.version>
|
<org.springframework.version>5.0.6.RELEASE</org.springframework.version>
|
||||||
<annotation-api.version>1.3.2</annotation-api.version>
|
<annotation-api.version>1.3.2</annotation-api.version>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.autowire.sample;
|
package com.baeldung.autowire.sample;
|
||||||
|
|
||||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
package org.baeldung.autowire.sample;
|
package com.baeldung.autowire.sample;
|
||||||
|
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan("org.baeldung.autowire.sample")
|
@ComponentScan("com.baeldung.autowire.sample")
|
||||||
public class AppConfig {
|
public class AppConfig {
|
||||||
|
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.autowire.sample;
|
package com.baeldung.autowire.sample;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.baeldung.autowire.sample;
|
||||||
|
|
||||||
|
public class FooDAO {
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.autowire.sample;
|
package com.baeldung.autowire.sample;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.autowire.sample;
|
package com.baeldung.autowire.sample;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.autowire.sample;
|
package com.baeldung.autowire.sample;
|
||||||
|
|
||||||
public interface Formatter {
|
public interface Formatter {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.autowire.sample;
|
package com.baeldung.autowire.sample;
|
||||||
|
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
||||||
import java.lang.annotation.Retention;
|
import java.lang.annotation.Retention;
|
|
@ -1,7 +1,7 @@
|
||||||
package org.baeldung.bean.config;
|
package com.baeldung.bean.config;
|
||||||
|
|
||||||
import org.baeldung.bean.injection.Helm;
|
import com.baeldung.bean.injection.Helm;
|
||||||
import org.baeldung.bean.injection.Ship;
|
import com.baeldung.bean.injection.Ship;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
package org.baeldung.bean.config;
|
package com.baeldung.bean.config;
|
||||||
|
|
||||||
import org.baeldung.bean.injection.Helm;
|
import com.baeldung.bean.injection.Helm;
|
||||||
import org.baeldung.bean.injection.Ship;
|
import com.baeldung.bean.injection.Ship;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
|
|
||||||
public class SetterBasedShipConfig {
|
public class SetterBasedShipConfig {
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.bean.injection;
|
package com.baeldung.bean.injection;
|
||||||
|
|
||||||
public class Helm {
|
public class Helm {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.bean.injection;
|
package com.baeldung.bean.injection;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
package org.baeldung.customannotation;
|
package com.baeldung.customannotation;
|
||||||
|
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan("org.baeldung.customannotation")
|
@ComponentScan("com.baeldung.customannotation")
|
||||||
public class CustomAnnotationConfiguration {
|
public class CustomAnnotationConfiguration {
|
||||||
}
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.customannotation;
|
package com.baeldung.customannotation;
|
||||||
|
|
||||||
import java.lang.annotation.Documented;
|
import java.lang.annotation.Documented;
|
||||||
import java.lang.annotation.ElementType;
|
import java.lang.annotation.ElementType;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.customannotation;
|
package com.baeldung.customannotation;
|
||||||
|
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.customannotation;
|
package com.baeldung.customannotation;
|
||||||
|
|
||||||
import java.lang.reflect.Constructor;
|
import java.lang.reflect.Constructor;
|
||||||
import java.lang.reflect.Field;
|
import java.lang.reflect.Field;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.customannotation;
|
package com.baeldung.customannotation;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.List;
|
import java.util.List;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.customscope;
|
package com.baeldung.customscope;
|
||||||
|
|
||||||
public class TenantBean {
|
public class TenantBean {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.customscope;
|
package com.baeldung.customscope;
|
||||||
|
|
||||||
import org.springframework.beans.BeansException;
|
import org.springframework.beans.BeansException;
|
||||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.customscope;
|
package com.baeldung.customscope;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.customscope;
|
package com.baeldung.customscope;
|
||||||
|
|
||||||
import java.util.Collections;
|
import java.util.Collections;
|
||||||
import java.util.HashMap;
|
import java.util.HashMap;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.customscope;
|
package com.baeldung.customscope;
|
||||||
|
|
||||||
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
import org.springframework.beans.factory.config.BeanFactoryPostProcessor;
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.nullibility;
|
package com.baeldung.nullibility;
|
||||||
|
|
||||||
import org.springframework.lang.NonNull;
|
import org.springframework.lang.NonNull;
|
||||||
import org.springframework.lang.Nullable;
|
import org.springframework.lang.Nullable;
|
|
@ -1,6 +1,6 @@
|
||||||
@NonNullApi
|
@NonNullApi
|
||||||
@NonNullFields
|
@NonNullFields
|
||||||
package org.baeldung.nullibility;
|
package com.baeldung.nullibility;
|
||||||
|
|
||||||
import org.springframework.lang.NonNullApi;
|
import org.springframework.lang.NonNullApi;
|
||||||
import org.springframework.lang.NonNullFields;
|
import org.springframework.lang.NonNullFields;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.order;
|
package com.baeldung.order;
|
||||||
|
|
||||||
import org.springframework.core.Ordered;
|
import org.springframework.core.Ordered;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.order;
|
package com.baeldung.order;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.order;
|
package com.baeldung.order;
|
||||||
|
|
||||||
import org.springframework.core.annotation.Order;
|
import org.springframework.core.annotation.Order;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.order;
|
package com.baeldung.order;
|
||||||
|
|
||||||
public interface Rating {
|
public interface Rating {
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.persistence;
|
package com.baeldung.persistence;
|
||||||
|
|
||||||
import org.springframework.context.ApplicationListener;
|
import org.springframework.context.ApplicationListener;
|
||||||
import org.springframework.context.event.ContextRefreshedEvent;
|
import org.springframework.context.event.ContextRefreshedEvent;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.primary;
|
package com.baeldung.primary;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Bean;
|
import org.springframework.context.annotation.Bean;
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
|
@ -6,7 +6,7 @@ import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan(basePackages="org.baeldung.primary")
|
@ComponentScan(basePackages="com.baeldung.primary")
|
||||||
public class Config {
|
public class Config {
|
||||||
|
|
||||||
@Bean
|
@Bean
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.primary;
|
package com.baeldung.primary;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.primary;
|
package com.baeldung.primary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Gebruiker on 7/17/2018.
|
* Created by Gebruiker on 7/17/2018.
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.primary;
|
package com.baeldung.primary;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Primary;
|
import org.springframework.context.annotation.Primary;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.primary;
|
package com.baeldung.primary;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Created by Gebruiker on 7/19/2018.
|
* Created by Gebruiker on 7/19/2018.
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.primary;
|
package com.baeldung.primary;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.primary;
|
package com.baeldung.primary;
|
||||||
|
|
||||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.profiles;
|
package com.baeldung.profiles;
|
||||||
|
|
||||||
public interface DatasourceConfig {
|
public interface DatasourceConfig {
|
||||||
void setup();
|
void setup();
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.profiles;
|
package com.baeldung.profiles;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Profile;
|
import org.springframework.context.annotation.Profile;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.profiles;
|
package com.baeldung.profiles;
|
||||||
|
|
||||||
import org.springframework.context.annotation.Profile;
|
import org.springframework.context.annotation.Profile;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.profiles;
|
package com.baeldung.profiles;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.core.env.Environment;
|
import org.springframework.core.env.Environment;
|
|
@ -1,11 +1,11 @@
|
||||||
package org.baeldung.profiles;
|
package com.baeldung.profiles;
|
||||||
|
|
||||||
import org.springframework.context.annotation.ComponentScan;
|
import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
import org.springframework.context.annotation.PropertySource;
|
import org.springframework.context.annotation.PropertySource;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan("org.baeldung.profiles")
|
@ComponentScan("com.baeldung.profiles")
|
||||||
@PropertySource(value = "classpath:application.properties")
|
@PropertySource(value = "classpath:application.properties")
|
||||||
public class SpringProfilesConfig {
|
public class SpringProfilesConfig {
|
||||||
|
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.baeldung.sample;
|
||||||
|
|
||||||
|
public class Bar {
|
||||||
|
|
||||||
|
}
|
|
@ -0,0 +1,5 @@
|
||||||
|
package com.baeldung.sample;
|
||||||
|
|
||||||
|
public class Foo {
|
||||||
|
|
||||||
|
}
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.sampleabstract;
|
package com.baeldung.sampleabstract;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.sampleabstract;
|
package com.baeldung.sampleabstract;
|
||||||
|
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.sampleabstract;
|
package com.baeldung.sampleabstract;
|
||||||
|
|
||||||
import org.springframework.context.ApplicationContext;
|
import org.springframework.context.ApplicationContext;
|
||||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
||||||
|
@ -6,7 +6,7 @@ import org.springframework.context.annotation.ComponentScan;
|
||||||
import org.springframework.context.annotation.Configuration;
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
@Configuration
|
@Configuration
|
||||||
@ComponentScan(basePackages = "org.baeldung.sampleabstract")
|
@ComponentScan(basePackages = "com.baeldung.sampleabstract")
|
||||||
public class DemoApp {
|
public class DemoApp {
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.sampleabstract;
|
package com.baeldung.sampleabstract;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
package org.baeldung.sampleabstract;
|
package com.baeldung.sampleabstract;
|
||||||
|
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue