remove keycloak, refactor packages (#2963)

This commit is contained in:
lor6 2017-11-05 18:32:37 +02:00 committed by Grzegorz Piwowarek
parent a9bea07bd5
commit 3952b7ef59
64 changed files with 220 additions and 205 deletions

View File

@ -24,10 +24,6 @@
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId> <artifactId>spring-boot-starter-web</artifactId>
</dependency> </dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-spring-boot-starter</artifactId>
</dependency>
<dependency> <dependency>
<groupId>org.springframework.boot</groupId> <groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId> <artifactId>spring-boot-starter-data-jpa</artifactId>
@ -172,17 +168,6 @@
<artifactId>artemis-server</artifactId> <artifactId>artemis-server</artifactId>
</dependency> </dependency>
</dependencies> </dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.keycloak.bom</groupId>
<artifactId>keycloak-adapter-bom</artifactId>
<version>3.3.0.CR2</version>
<type>pom</type>
<scope>import</scope>
</dependency>
</dependencies>
</dependencyManagement>
<build> <build>
<finalName>spring-boot</finalName> <finalName>spring-boot</finalName>
@ -282,7 +267,7 @@
<properties> <properties>
<!-- The main class to start by executing java -jar --> <!-- The main class to start by executing java -jar -->
<start-class>org.baeldung.boot.DemoApplication</start-class> <start-class>org.baeldung.demo.DemoApplication</start-class>
<spring.version>4.3.4.RELEASE</spring.version> <spring.version>4.3.4.RELEASE</spring.version>
<git-commit-id-plugin.version>2.2.1</git-commit-id-plugin.version> <git-commit-id-plugin.version>2.2.1</git-commit-id-plugin.version>
<jquery.version>3.1.1</jquery.version> <jquery.version>3.1.1</jquery.version>

View File

@ -1,4 +1,4 @@
package org.baeldung; package org.baeldung.boot;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;

View File

@ -1,4 +1,4 @@
package org.baeldung.client; package org.baeldung.boot.client;
public class Details { public class Details {

View File

@ -1,4 +1,4 @@
package org.baeldung.client; package org.baeldung.boot.client;
import org.springframework.boot.web.client.RestTemplateBuilder; import org.springframework.boot.web.client.RestTemplateBuilder;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;

View File

@ -1,4 +1,4 @@
package org.baeldung.config; package org.baeldung.boot.config;
import java.util.Properties; import java.util.Properties;
@ -18,7 +18,7 @@ import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.annotation.EnableTransactionManagement; import org.springframework.transaction.annotation.EnableTransactionManagement;
@Configuration @Configuration
@EnableJpaRepositories(basePackages = { "org.baeldung.repository", "org.baeldung.boot.repository", "org.baeldung.boot.boottest" }) @EnableJpaRepositories(basePackages = { "org.baeldung.boot.repository", "org.baeldung.boot.boottest","org.baeldung.repository" })
@PropertySource("classpath:persistence-generic-entity.properties") @PropertySource("classpath:persistence-generic-entity.properties")
@EnableTransactionManagement @EnableTransactionManagement
public class H2JpaConfig { public class H2JpaConfig {
@ -41,7 +41,7 @@ public class H2JpaConfig {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() { public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource()); em.setDataSource(dataSource());
em.setPackagesToScan(new String[] { "org.baeldung.domain", "org.baeldung.boot.model", "org.baeldung.boot.boottest" }); em.setPackagesToScan(new String[] { "org.baeldung.boot.domain", "org.baeldung.boot.model", "org.baeldung.boot.boottest", "org.baeldung.model" });
em.setJpaVendorAdapter(new HibernateJpaVendorAdapter()); em.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
em.setJpaProperties(additionalProperties()); em.setJpaProperties(additionalProperties());
return em; return em;

View File

@ -1,9 +1,9 @@
package org.baeldung.config; package org.baeldung.boot.config;
import org.baeldung.converter.GenericBigDecimalConverter; import org.baeldung.boot.converter.GenericBigDecimalConverter;
import org.baeldung.converter.StringToEnumConverterFactory; import org.baeldung.boot.converter.StringToEmployeeConverter;
import org.baeldung.converter.StringToEmployeeConverter; import org.baeldung.boot.converter.StringToEnumConverterFactory;
import org.baeldung.web.resolver.HeaderVersionArgumentResolver; import org.baeldung.boot.web.resolver.HeaderVersionArgumentResolver;
import org.springframework.context.annotation.Configuration; import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry; import org.springframework.format.FormatterRegistry;
import org.springframework.web.method.support.HandlerMethodArgumentResolver; import org.springframework.web.method.support.HandlerMethodArgumentResolver;

View File

@ -1,8 +1,8 @@
package org.baeldung.controller; package org.baeldung.boot.controller;
import org.baeldung.domain.GenericEntity; import org.baeldung.boot.domain.GenericEntity;
import org.baeldung.domain.Modes; import org.baeldung.boot.domain.Modes;
import org.baeldung.web.resolver.Version; import org.baeldung.boot.web.resolver.Version;
import org.springframework.http.HttpStatus; import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity; import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;

View File

@ -1,4 +1,4 @@
package org.baeldung.controller.servlet; package org.baeldung.boot.controller.servlet;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;

View File

@ -1,4 +1,4 @@
package org.baeldung.controller.servlet; package org.baeldung.boot.controller.servlet;
import java.io.IOException; import java.io.IOException;
import java.io.PrintWriter; import java.io.PrintWriter;

View File

@ -1,4 +1,4 @@
package org.baeldung.converter; package org.baeldung.boot.converter;
import com.google.common.collect.ImmutableSet; import com.google.common.collect.ImmutableSet;
import org.springframework.core.convert.TypeDescriptor; import org.springframework.core.convert.TypeDescriptor;

View File

@ -1,4 +1,4 @@
package org.baeldung.converter; package org.baeldung.boot.converter;
import com.baeldung.toggle.Employee; import com.baeldung.toggle.Employee;

View File

@ -1,4 +1,4 @@
package org.baeldung.converter; package org.baeldung.boot.converter;
import org.springframework.core.convert.converter.Converter; import org.springframework.core.convert.converter.Converter;
import org.springframework.core.convert.converter.ConverterFactory; import org.springframework.core.convert.converter.ConverterFactory;

View File

@ -1,4 +1,4 @@
package org.baeldung.converter; package org.baeldung.boot.converter;
import org.springframework.core.convert.converter.Converter; import org.springframework.core.convert.converter.Converter;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.converter.controller; package org.baeldung.boot.converter.controller;
import com.baeldung.toggle.Employee; import com.baeldung.toggle.Employee;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;

View File

@ -1,4 +1,4 @@
package org.baeldung.domain; package org.baeldung.boot.domain;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;

View File

@ -1,4 +1,4 @@
package org.baeldung.domain; package org.baeldung.boot.domain;
public enum Modes { public enum Modes {

View File

@ -1,4 +1,4 @@
package org.baeldung.jsoncomponent; package org.baeldung.boot.jsoncomponent;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;

View File

@ -1,4 +1,4 @@
package org.baeldung.jsoncomponent; package org.baeldung.boot.jsoncomponent;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonParser;

View File

@ -1,4 +1,4 @@
package org.baeldung.jsoncomponent; package org.baeldung.boot.jsoncomponent;
import com.fasterxml.jackson.core.JsonParser; import com.fasterxml.jackson.core.JsonParser;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;

View File

@ -1,4 +1,4 @@
package org.baeldung.jsoncomponent; package org.baeldung.boot.jsoncomponent;
import com.fasterxml.jackson.core.JsonGenerator; import com.fasterxml.jackson.core.JsonGenerator;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;

View File

@ -1,4 +1,4 @@
package org.baeldung.monitor.jmx; package org.baeldung.boot.monitor.jmx;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;

View File

@ -1,6 +1,6 @@
package org.baeldung.repository; package org.baeldung.boot.repository;
import org.baeldung.domain.GenericEntity; import org.baeldung.boot.domain.GenericEntity;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
public interface GenericEntityRepository extends JpaRepository<GenericEntity, Long> { public interface GenericEntityRepository extends JpaRepository<GenericEntity, Long> {

View File

@ -1,4 +1,4 @@
package org.baeldung.web.resolver; package org.baeldung.boot.web.resolver;
import org.springframework.core.MethodParameter; import org.springframework.core.MethodParameter;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.web.resolver; package org.baeldung.boot.web.resolver;
import java.lang.annotation.ElementType; import java.lang.annotation.ElementType;
import java.lang.annotation.Retention; import java.lang.annotation.Retention;

View File

@ -1,4 +1,4 @@
package org.baeldung.boot; package org.baeldung.demo;
import com.baeldung.graphql.GraphqlConfiguration; import com.baeldung.graphql.GraphqlConfiguration;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.boottest; package org.baeldung.demo.boottest;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.boottest; package org.baeldung.demo.boottest;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.boottest; package org.baeldung.demo.boottest;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.boottest; package org.baeldung.demo.boottest;
import java.util.List; import java.util.List;

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.boottest; package org.baeldung.demo.boottest;
import java.util.List; import java.util.List;

View File

@ -1,7 +1,7 @@
package org.baeldung.boot.components; package org.baeldung.demo.components;
import org.baeldung.boot.model.Foo; import org.baeldung.demo.model.Foo;
import org.baeldung.boot.repository.FooRepository; import org.baeldung.demo.repository.FooRepository;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.exceptions; package org.baeldung.demo.exceptions;
public class CommonException extends RuntimeException { public class CommonException extends RuntimeException {

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.exceptions; package org.baeldung.demo.exceptions;
public class FooNotFoundException extends RuntimeException { public class FooNotFoundException extends RuntimeException {

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.model; package org.baeldung.demo.model;
import java.io.Serializable; import java.io.Serializable;

View File

@ -1,6 +1,6 @@
package org.baeldung.boot.repository; package org.baeldung.demo.repository;
import org.baeldung.boot.model.Foo; import org.baeldung.demo.model.Foo;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
public interface FooRepository extends JpaRepository<Foo, Integer> { public interface FooRepository extends JpaRepository<Foo, Integer> {

View File

@ -1,7 +1,7 @@
package org.baeldung.boot.service; package org.baeldung.demo.service;
import org.baeldung.boot.components.FooService; import org.baeldung.demo.components.FooService;
import org.baeldung.boot.model.Foo; import org.baeldung.demo.model.Foo;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable; import org.springframework.web.bind.annotation.PathVariable;

View File

@ -3,7 +3,7 @@ package org.baeldung.endpoints.info;
import java.util.HashMap; import java.util.HashMap;
import java.util.Map; import java.util.Map;
import org.baeldung.boot.repository.UserRepository; import org.baeldung.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.info.Info; import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor; import org.springframework.boot.actuate.info.InfoContributor;

View File

@ -1,9 +1,9 @@
package org.baeldung.main; package org.baeldung.main;
import org.baeldung.boot.controller.servlet.HelloWorldServlet;
import org.baeldung.boot.controller.servlet.SpringHelloWorldServlet;
import org.baeldung.common.error.SpringHelloServletRegistrationBean; import org.baeldung.common.error.SpringHelloServletRegistrationBean;
import org.baeldung.common.resources.ExecutorServiceExitCodeGenerator; import org.baeldung.common.resources.ExecutorServiceExitCodeGenerator;
import org.baeldung.controller.servlet.HelloWorldServlet;
import org.baeldung.controller.servlet.SpringHelloWorldServlet;
import org.baeldung.service.LoginService; import org.baeldung.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
@ -11,6 +11,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ApplicationContext; import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.ComponentScan; import org.springframework.context.annotation.ComponentScan;
import org.springframework.data.jpa.repository.config.EnableJpaRepositories;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
@ -21,7 +22,7 @@ import java.util.concurrent.Executors;
@RestController @RestController
@EnableAutoConfiguration(exclude = MySQLAutoconfiguration.class) @EnableAutoConfiguration(exclude = MySQLAutoconfiguration.class)
@ComponentScan({ "org.baeldung.common.error", "org.baeldung.common.error.controller", "org.baeldung.common.properties", "org.baeldung.common.resources", "org.baeldung.endpoints", "org.baeldung.service", "org.baeldung.monitor.jmx", "org.baeldung.service" }) @ComponentScan({ "org.baeldung.common.error", "org.baeldung.common.error.controller", "org.baeldung.common.properties", "org.baeldung.common.resources","org.baeldung.endpoints", "org.baeldung.service", "org.baeldung.monitor.jmx", "org.baeldung.boot.config"})
public class SpringBootApplication { public class SpringBootApplication {
private static ApplicationContext applicationContext; private static ApplicationContext applicationContext;

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.model; package org.baeldung.model;
import javax.persistence.Entity; import javax.persistence.Entity;
import javax.persistence.GeneratedValue; import javax.persistence.GeneratedValue;

View File

@ -1,6 +1,6 @@
package org.baeldung.boot.repository; package org.baeldung.repository;
import org.baeldung.boot.model.User; import org.baeldung.model.User;
import org.springframework.data.jpa.repository.JpaRepository; import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.stereotype.Repository; import org.springframework.stereotype.Repository;

View File

@ -1,6 +1,6 @@
package org.baeldung.session.exception; package org.baeldung.session.exception;
import org.baeldung.boot.model.Foo; import org.baeldung.demo.model.Foo;
import org.springframework.boot.SpringApplication; import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication; import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan; import org.springframework.boot.autoconfigure.domain.EntityScan;

View File

@ -1,6 +1,6 @@
package org.baeldung.session.exception.repository; package org.baeldung.session.exception.repository;
import org.baeldung.boot.model.Foo; import org.baeldung.demo.model.Foo;
public interface FooRepository { public interface FooRepository {

View File

@ -1,6 +1,6 @@
package org.baeldung.session.exception.repository; package org.baeldung.session.exception.repository;
import org.baeldung.boot.model.Foo; import org.baeldung.demo.model.Foo;
import org.hibernate.SessionFactory; import org.hibernate.SessionFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Profile; import org.springframework.context.annotation.Profile;

View File

@ -1,6 +1,7 @@
package org.baeldung; package org.baeldung;
import org.baeldung.domain.Modes; import org.baeldung.boot.Application;
import org.baeldung.boot.domain.Modes;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -1,8 +1,9 @@
package org.baeldung; package org.baeldung;
import org.baeldung.config.H2JpaConfig; import org.baeldung.boot.Application;
import org.baeldung.domain.GenericEntity; import org.baeldung.boot.config.H2JpaConfig;
import org.baeldung.repository.GenericEntityRepository; import org.baeldung.boot.domain.GenericEntity;
import org.baeldung.boot.repository.GenericEntityRepository;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,7 +1,8 @@
package org.baeldung; package org.baeldung;
import org.baeldung.domain.GenericEntity; import org.baeldung.boot.Application;
import org.baeldung.repository.GenericEntityRepository; import org.baeldung.boot.domain.GenericEntity;
import org.baeldung.boot.repository.GenericEntityRepository;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,5 +1,6 @@
package org.baeldung; package org.baeldung;
import org.baeldung.boot.Application;
import org.junit.After; import org.junit.After;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;

View File

@ -1,8 +1,9 @@
package org.baeldung; package org.baeldung;
import org.baeldung.boot.Application;
import org.baeldung.boot.domain.GenericEntity;
import org.baeldung.boot.repository.GenericEntityRepository;
import org.baeldung.config.H2TestProfileJPAConfig; import org.baeldung.config.H2TestProfileJPAConfig;
import org.baeldung.domain.GenericEntity;
import org.baeldung.repository.GenericEntityRepository;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,5 +1,6 @@
package org.baeldung.boot; package org.baeldung.boot;
import org.baeldung.demo.DemoApplication;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.boot.test.context.SpringBootTest; import org.springframework.boot.test.context.SpringBootTest;

View File

@ -1,4 +1,4 @@
package org.baeldung.client; package org.baeldung.boot.client;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import org.junit.Before; import org.junit.Before;
@ -14,6 +14,9 @@ import static org.assertj.core.api.Assertions.assertThat;
import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo; import static org.springframework.test.web.client.match.MockRestRequestMatchers.requestTo;
import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess; import static org.springframework.test.web.client.response.MockRestResponseCreators.withSuccess;
import org.baeldung.boot.client.Details;
import org.baeldung.boot.client.DetailsServiceClient;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@RestClientTest(DetailsServiceClient.class) @RestClientTest(DetailsServiceClient.class)
public class DetailsServiceClientIntegrationTest { public class DetailsServiceClientIntegrationTest {

View File

@ -1,7 +1,9 @@
package org.baeldung.jsoncomponent; package org.baeldung.boot.jsoncomponent;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
import javafx.scene.paint.Color; import javafx.scene.paint.Color;
import org.baeldung.boot.jsoncomponent.User;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,4 +1,4 @@
package org.baeldung.jsoncomponent; package org.baeldung.boot.jsoncomponent;
import com.fasterxml.jackson.core.JsonProcessingException; import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;
@ -11,6 +11,8 @@ import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertEquals;
import org.baeldung.boot.jsoncomponent.User;
@JsonTest @JsonTest
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
public class UserJsonSerializerIntegrationTest { public class UserJsonSerializerIntegrationTest {

View File

@ -3,7 +3,8 @@ package org.baeldung.boot.repository;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThat;
import org.baeldung.boot.DemoApplicationIntegrationTest; import org.baeldung.boot.DemoApplicationIntegrationTest;
import org.baeldung.boot.model.Foo; import org.baeldung.demo.model.Foo;
import org.baeldung.demo.repository.FooRepository;
import static org.hamcrest.Matchers.notNullValue; import static org.hamcrest.Matchers.notNullValue;
import static org.hamcrest.Matchers.is; import static org.hamcrest.Matchers.is;

View File

@ -5,7 +5,7 @@ import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat; import static org.junit.Assert.assertThat;
import org.baeldung.boot.ApplicationIntegrationTest; import org.baeldung.boot.ApplicationIntegrationTest;
import org.baeldung.boot.model.Foo; import org.baeldung.demo.model.Foo;
import org.baeldung.session.exception.repository.FooRepository; import org.baeldung.session.exception.repository.FooRepository;
import org.junit.Test; import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,7 +1,7 @@
package org.baeldung.boot.repository; package org.baeldung.boot.repository;
import org.baeldung.boot.ApplicationIntegrationTest; import org.baeldung.boot.ApplicationIntegrationTest;
import org.baeldung.boot.model.Foo; import org.baeldung.demo.model.Foo;
import org.baeldung.session.exception.repository.FooRepository; import org.baeldung.session.exception.repository.FooRepository;
import org.hibernate.HibernateException; import org.hibernate.HibernateException;
import org.junit.Test; import org.junit.Test;

View File

@ -41,7 +41,7 @@ public class H2TestProfileJPAConfig {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() { public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean(); final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
em.setDataSource(dataSource()); em.setDataSource(dataSource());
em.setPackagesToScan(new String[] { "org.baeldung.domain", "org.baeldung.boot.model", "org.baeldung.boot.boottest" }); em.setPackagesToScan(new String[] { "org.baeldung.domain", "org.baeldung.boot.domain", "org.baeldung.boot.boottest","org.baeldung.model" });
em.setJpaVendorAdapter(new HibernateJpaVendorAdapter()); em.setJpaVendorAdapter(new HibernateJpaVendorAdapter());
em.setJpaProperties(additionalProperties()); em.setJpaProperties(additionalProperties());
return em; return em;

View File

@ -1,8 +1,9 @@
package org.baeldung.converter; package org.baeldung.converter;
import com.baeldung.toggle.Employee; import com.baeldung.toggle.Employee;
import org.baeldung.Application;
import org.baeldung.domain.Modes; import org.baeldung.boot.Application;
import org.baeldung.boot.domain.Modes;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,6 +1,5 @@
package org.baeldung.converter.controller; package org.baeldung.converter.controller;
import org.baeldung.Application;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -15,6 +14,8 @@ import static org.springframework.test.web.servlet.result.MockMvcResultHandlers.
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.jsonPath;
import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status; import static org.springframework.test.web.servlet.result.MockMvcResultMatchers.status;
import org.baeldung.boot.Application;
@RunWith(SpringRunner.class) @RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class) @SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class)
@AutoConfigureMockMvc @AutoConfigureMockMvc

View File

@ -1,5 +1,8 @@
package org.baeldung.boot.boottest; package org.baeldung.demo.boottest;
import org.baeldung.demo.boottest.Employee;
import org.baeldung.demo.boottest.EmployeeRestController;
import org.baeldung.demo.boottest.EmployeeService;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -1,5 +1,7 @@
package org.baeldung.boot.boottest; package org.baeldung.demo.boottest;
import org.baeldung.demo.boottest.Employee;
import org.baeldung.demo.boottest.EmployeeRepository;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,6 +1,8 @@
package org.baeldung.boot.boottest; package org.baeldung.demo.boottest;
import org.baeldung.boot.DemoApplication; import org.baeldung.demo.DemoApplication;
import org.baeldung.demo.boottest.Employee;
import org.baeldung.demo.boottest.EmployeeRepository;
import org.junit.After; import org.junit.After;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -1,5 +1,9 @@
package org.baeldung.boot.boottest; package org.baeldung.demo.boottest;
import org.baeldung.demo.boottest.Employee;
import org.baeldung.demo.boottest.EmployeeRepository;
import org.baeldung.demo.boottest.EmployeeService;
import org.baeldung.demo.boottest.EmployeeServiceImpl;
import org.junit.Before; import org.junit.Before;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.boottest; package org.baeldung.demo.boottest;
import com.fasterxml.jackson.annotation.JsonInclude; import com.fasterxml.jackson.annotation.JsonInclude;
import com.fasterxml.jackson.databind.ObjectMapper; import com.fasterxml.jackson.databind.ObjectMapper;

View File

@ -1,5 +1,7 @@
package org.baeldung.properties; package org.baeldung.properties;
import org.baeldung.properties.ConfigProperties;
import org.baeldung.properties.ConfigPropertiesDemoApplication;
import org.junit.Assert; import org.junit.Assert;
import org.junit.Test; import org.junit.Test;
import org.junit.runner.RunWith; import org.junit.runner.RunWith;