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>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-spring-boot-starter</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
@ -172,17 +168,6 @@
<artifactId>artemis-server</artifactId>
</dependency>
</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>
<finalName>spring-boot</finalName>
@ -282,7 +267,7 @@
<properties>
<!-- 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>
<git-commit-id-plugin.version>2.2.1</git-commit-id-plugin.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.autoconfigure.SpringBootApplication;

View File

@ -1,4 +1,4 @@
package org.baeldung.client;
package org.baeldung.boot.client;
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.stereotype.Service;

View File

@ -1,4 +1,4 @@
package org.baeldung.config;
package org.baeldung.boot.config;
import java.util.Properties;
@ -18,7 +18,7 @@ import org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter;
import org.springframework.transaction.annotation.EnableTransactionManagement;
@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")
@EnableTransactionManagement
public class H2JpaConfig {
@ -41,7 +41,7 @@ public class H2JpaConfig {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
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.setJpaProperties(additionalProperties());
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.converter.StringToEnumConverterFactory;
import org.baeldung.converter.StringToEmployeeConverter;
import org.baeldung.web.resolver.HeaderVersionArgumentResolver;
import org.baeldung.boot.converter.GenericBigDecimalConverter;
import org.baeldung.boot.converter.StringToEmployeeConverter;
import org.baeldung.boot.converter.StringToEnumConverterFactory;
import org.baeldung.boot.web.resolver.HeaderVersionArgumentResolver;
import org.springframework.context.annotation.Configuration;
import org.springframework.format.FormatterRegistry;
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.domain.Modes;
import org.baeldung.web.resolver.Version;
import org.baeldung.boot.domain.GenericEntity;
import org.baeldung.boot.domain.Modes;
import org.baeldung.boot.web.resolver.Version;
import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;

View File

@ -1,43 +1,43 @@
package org.baeldung.controller.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Objects;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class HelloWorldServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public HelloWorldServlet() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = null;
try {
out = response.getWriter();
out.println("HelloWorldServlet: GET METHOD");
out.flush();
} finally {
if (!Objects.isNull(out))
out.close();
}
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = null;
try {
out = response.getWriter();
out.println("HelloWorldServlet: POST METHOD");
out.flush();
} finally {
if (!Objects.isNull(out))
out.close();
}
}
}
package org.baeldung.boot.controller.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Objects;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class HelloWorldServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public HelloWorldServlet() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = null;
try {
out = response.getWriter();
out.println("HelloWorldServlet: GET METHOD");
out.flush();
} finally {
if (!Objects.isNull(out))
out.close();
}
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = null;
try {
out = response.getWriter();
out.println("HelloWorldServlet: POST METHOD");
out.flush();
} finally {
if (!Objects.isNull(out))
out.close();
}
}
}

View File

@ -1,43 +1,43 @@
package org.baeldung.controller.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Objects;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class SpringHelloWorldServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public SpringHelloWorldServlet() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = null;
try {
out = response.getWriter();
out.println("SpringHelloWorldServlet: GET METHOD");
out.flush();
} finally {
if (!Objects.isNull(out))
out.close();
}
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = null;
try {
out = response.getWriter();
out.println("SpringHelloWorldServlet: POST METHOD");
out.flush();
} finally {
if (!Objects.isNull(out))
out.close();
}
}
}
package org.baeldung.boot.controller.servlet;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Objects;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
public class SpringHelloWorldServlet extends HttpServlet {
private static final long serialVersionUID = 1L;
public SpringHelloWorldServlet() {
super();
}
protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = null;
try {
out = response.getWriter();
out.println("SpringHelloWorldServlet: GET METHOD");
out.flush();
} finally {
if (!Objects.isNull(out))
out.close();
}
}
protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {
PrintWriter out = null;
try {
out = response.getWriter();
out.println("SpringHelloWorldServlet: POST METHOD");
out.flush();
} finally {
if (!Objects.isNull(out))
out.close();
}
}
}

View File

@ -1,4 +1,4 @@
package org.baeldung.converter;
package org.baeldung.boot.converter;
import com.google.common.collect.ImmutableSet;
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;

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.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.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 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.GeneratedValue;

View File

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

View File

@ -1,4 +1,4 @@
package org.baeldung.jsoncomponent;
package org.baeldung.boot.jsoncomponent;
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.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.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.JsonProcessingException;

View File

@ -1,22 +1,22 @@
package org.baeldung.monitor.jmx;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.MetricRegistry;
@Configuration
public class MonitoringConfig {
@Autowired
private MetricRegistry registry;
@Bean
public JmxReporter jmxReporter() {
JmxReporter reporter = JmxReporter.forRegistry(registry)
.build();
reporter.start();
return reporter;
}
}
package org.baeldung.boot.monitor.jmx;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import com.codahale.metrics.JmxReporter;
import com.codahale.metrics.MetricRegistry;
@Configuration
public class MonitoringConfig {
@Autowired
private MetricRegistry registry;
@Bean
public JmxReporter jmxReporter() {
JmxReporter reporter = JmxReporter.forRegistry(registry)
.build();
reporter.start();
return reporter;
}
}

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;
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.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.Retention;

View File

@ -1,4 +1,4 @@
package org.baeldung.boot;
package org.baeldung.demo;
import com.baeldung.graphql.GraphqlConfiguration;
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.GeneratedValue;

View File

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

View File

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

View File

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

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.boottest;
package org.baeldung.demo.boottest;
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.boot.repository.FooRepository;
import org.baeldung.demo.model.Foo;
import org.baeldung.demo.repository.FooRepository;
import org.springframework.beans.factory.annotation.Autowired;
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 {

View File

@ -1,4 +1,4 @@
package org.baeldung.boot.exceptions;
package org.baeldung.demo.exceptions;
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;

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;
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.boot.model.Foo;
import org.baeldung.demo.components.FooService;
import org.baeldung.demo.model.Foo;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
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.Map;
import org.baeldung.boot.repository.UserRepository;
import org.baeldung.repository.UserRepository;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.actuate.info.Info;
import org.springframework.boot.actuate.info.InfoContributor;

View File

@ -1,9 +1,9 @@
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.resources.ExecutorServiceExitCodeGenerator;
import org.baeldung.controller.servlet.HelloWorldServlet;
import org.baeldung.controller.servlet.SpringHelloWorldServlet;
import org.baeldung.service.LoginService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.SpringApplication;
@ -11,6 +11,7 @@ import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.Bean;
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.RestController;
@ -21,7 +22,7 @@ import java.util.concurrent.Executors;
@RestController
@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 {
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.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.stereotype.Repository;

View File

@ -1,6 +1,6 @@
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.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.domain.EntityScan;

View File

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

View File

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

View File

@ -1,6 +1,7 @@
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.Test;
import org.junit.runner.RunWith;

View File

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

View File

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

View File

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

View File

@ -1,8 +1,9 @@
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.domain.GenericEntity;
import org.baeldung.repository.GenericEntityRepository;
import org.junit.Test;
import org.junit.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,5 +1,6 @@
package org.baeldung.boot;
import org.baeldung.demo.DemoApplication;
import org.junit.Test;
import org.junit.runner.RunWith;
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 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.response.MockRestResponseCreators.withSuccess;
import org.baeldung.boot.client.Details;
import org.baeldung.boot.client.DetailsServiceClient;
@RunWith(SpringRunner.class)
@RestClientTest(DetailsServiceClient.class)
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 javafx.scene.paint.Color;
import org.baeldung.boot.jsoncomponent.User;
import org.junit.Test;
import org.junit.runner.RunWith;
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.databind.ObjectMapper;
@ -11,6 +11,8 @@ import org.springframework.test.context.junit4.SpringRunner;
import static org.junit.Assert.assertEquals;
import org.baeldung.boot.jsoncomponent.User;
@JsonTest
@RunWith(SpringRunner.class)
public class UserJsonSerializerIntegrationTest {

View File

@ -3,7 +3,8 @@ package org.baeldung.boot.repository;
import static org.junit.Assert.assertThat;
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.is;

View File

@ -5,7 +5,7 @@ import static org.hamcrest.CoreMatchers.notNullValue;
import static org.junit.Assert.assertThat;
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.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,7 +1,7 @@
package org.baeldung.boot.repository;
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.hibernate.HibernateException;
import org.junit.Test;

View File

@ -41,7 +41,7 @@ public class H2TestProfileJPAConfig {
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
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.setJpaProperties(additionalProperties());
return em;

View File

@ -1,8 +1,9 @@
package org.baeldung.converter;
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.runner.RunWith;
import org.springframework.beans.factory.annotation.Autowired;

View File

@ -1,6 +1,5 @@
package org.baeldung.converter.controller;
import org.baeldung.Application;
import org.junit.Test;
import org.junit.runner.RunWith;
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.status;
import org.baeldung.boot.Application;
@RunWith(SpringRunner.class)
@SpringBootTest(webEnvironment = SpringBootTest.WebEnvironment.RANDOM_PORT, classes = Application.class)
@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.Test;
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.runner.RunWith;
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.Test;
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.Test;
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.databind.ObjectMapper;

View File

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