Merge pull request #8401 from kwoyke/BAEL-19967
BAEL-19967: Migrate some spring-* modules to the com.baeldung package
This commit is contained in:
commit
173b370c56
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.akka;
|
||||
package com.baeldung.akka;
|
||||
|
||||
import akka.actor.ActorSystem;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -7,8 +7,6 @@ import org.springframework.context.annotation.Bean;
|
|||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import static org.baeldung.akka.SpringExtension.SPRING_EXTENSION_PROVIDER;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan
|
||||
public class AppConfiguration {
|
||||
|
@ -19,7 +17,7 @@ public class AppConfiguration {
|
|||
@Bean
|
||||
public ActorSystem actorSystem() {
|
||||
ActorSystem system = ActorSystem.create("akka-spring-demo");
|
||||
SPRING_EXTENSION_PROVIDER.get(system).initialize(applicationContext);
|
||||
SpringExtension.SPRING_EXTENSION_PROVIDER.get(system).initialize(applicationContext);
|
||||
return system;
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.akka;
|
||||
package com.baeldung.akka;
|
||||
|
||||
import akka.actor.UntypedActor;
|
||||
import org.springframework.beans.factory.config.ConfigurableBeanFactory;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.akka;
|
||||
package com.baeldung.akka;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.akka;
|
||||
package com.baeldung.akka;
|
||||
|
||||
import akka.actor.Actor;
|
||||
import akka.actor.IndirectActorProducer;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.akka;
|
||||
package com.baeldung.akka;
|
||||
|
||||
import akka.actor.AbstractExtensionId;
|
||||
import akka.actor.ExtendedActorSystem;
|
|
@ -1,11 +1,11 @@
|
|||
package org.baeldung.akka;
|
||||
package com.baeldung.akka;
|
||||
|
||||
import java.util.concurrent.TimeUnit;
|
||||
|
||||
import akka.actor.ActorRef;
|
||||
import akka.actor.ActorSystem;
|
||||
import akka.util.Timeout;
|
||||
import org.baeldung.akka.GreetingActor.Greet;
|
||||
import com.baeldung.akka.GreetingActor.Greet;
|
||||
import org.junit.After;
|
||||
import org.junit.Assert;
|
||||
import org.junit.Test;
|
||||
|
@ -17,7 +17,7 @@ import scala.concurrent.Future;
|
|||
import scala.concurrent.duration.FiniteDuration;
|
||||
|
||||
import static akka.pattern.Patterns.ask;
|
||||
import static org.baeldung.akka.SpringExtension.SPRING_EXTENSION_PROVIDER;
|
||||
import static com.baeldung.akka.SpringExtension.SPRING_EXTENSION_PROVIDER;
|
||||
|
||||
@ContextConfiguration(classes = AppConfiguration.class)
|
||||
public class SpringAkkaIntegrationTest extends AbstractJUnit4SpringContextTests {
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung;
|
||||
package com.baeldung;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung;
|
||||
package com.baeldung;
|
||||
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
||||
|
@ -9,7 +9,7 @@ import org.springframework.stereotype.Component;
|
|||
@Component
|
||||
public class ExampleAspect {
|
||||
|
||||
@Around("@annotation(LogExecutionTime)")
|
||||
@Around("@annotation(com.baeldung.LogExecutionTime)")
|
||||
public Object logExecutionTime(ProceedingJoinPoint joinPoint) throws Throwable {
|
||||
final long start = System.currentTimeMillis();
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung;
|
||||
package com.baeldung;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung;
|
||||
package com.baeldung;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aspectj;
|
||||
package com.baeldung.aspectj;
|
||||
|
||||
public class Account {
|
||||
int balance = 20;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aspectj;
|
||||
package com.baeldung.aspectj;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -8,7 +8,7 @@ public aspect AccountAspect {
|
|||
final int MIN_BALANCE = 10;
|
||||
|
||||
pointcut callWithDraw(int amount, Account account):
|
||||
call(boolean Account.withdraw(int)) && args(amount) && target(account);
|
||||
call(boolean com.baeldung.aspectj.Account.withdraw(int)) && args(amount) && target(account);
|
||||
|
||||
before(int amount, Account account) : callWithDraw(amount, account) {
|
||||
logger.info(" Balance before withdrawal: {}", account.balance);
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aspectj;
|
||||
package com.baeldung.aspectj;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aspectj;
|
||||
package com.baeldung.aspectj;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aspectj;
|
||||
package com.baeldung.aspectj;
|
||||
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
|
@ -1,13 +1,13 @@
|
|||
package org.baeldung.logger;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AdderAfterAspect {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void afterAdvice() throws Throwable {
|
||||
logger.info("I'm done calling the method");
|
||||
}
|
||||
}
|
||||
package com.baeldung.logger;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AdderAfterAspect {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void afterAdvice() throws Throwable {
|
||||
logger.info("I'm done calling the method");
|
||||
}
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
package org.baeldung.logger;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AdderAfterReturnAspect {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void afterReturn(final Object returnValue) throws Throwable {
|
||||
logger.info("value return was {}", returnValue);
|
||||
}
|
||||
}
|
||||
package com.baeldung.logger;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AdderAfterReturnAspect {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void afterReturn(final Object returnValue) throws Throwable {
|
||||
logger.info("value return was {}", returnValue);
|
||||
}
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
package org.baeldung.logger;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AdderAfterThrowAspect {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void afterThrow(final Exception exception) throws Throwable {
|
||||
logger.info("Exception thrown was {}", exception.getMessage());
|
||||
}
|
||||
}
|
||||
package com.baeldung.logger;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AdderAfterThrowAspect {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void afterThrow(final Exception exception) throws Throwable {
|
||||
logger.info("Exception thrown was {}", exception.getMessage());
|
||||
}
|
||||
}
|
|
@ -1,18 +1,18 @@
|
|||
package org.baeldung.logger;
|
||||
|
||||
import java.util.Arrays;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AdderAroundAspect {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public Object aroundAdvice(final ProceedingJoinPoint joinPoint) throws Throwable {
|
||||
logger.info("Arguments passed to method are: " + Arrays.toString(joinPoint.getArgs()));
|
||||
final Object result = joinPoint.proceed();
|
||||
logger.info("Result from method is: " + result);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
package com.baeldung.logger;
|
||||
|
||||
import java.util.Arrays;
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AdderAroundAspect {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public Object aroundAdvice(final ProceedingJoinPoint joinPoint) throws Throwable {
|
||||
logger.info("Arguments passed to method are: " + Arrays.toString(joinPoint.getArgs()));
|
||||
final Object result = joinPoint.proceed();
|
||||
logger.info("Result from method is: " + result);
|
||||
return result;
|
||||
}
|
||||
}
|
|
@ -1,13 +1,13 @@
|
|||
package org.baeldung.logger;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AdderBeforeAspect {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void beforeAdvice() throws Throwable {
|
||||
logger.info("I would be executed just before method starts");
|
||||
}
|
||||
}
|
||||
package com.baeldung.logger;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
public class AdderBeforeAspect {
|
||||
|
||||
private final Logger logger = LoggerFactory.getLogger(this.getClass());
|
||||
|
||||
public void beforeAdvice() throws Throwable {
|
||||
logger.info("I would be executed just before method starts");
|
||||
}
|
||||
}
|
|
@ -1,12 +1,12 @@
|
|||
package org.baeldung.logger;
|
||||
|
||||
public class SampleAdder {
|
||||
|
||||
public int add(int a, int b) {
|
||||
if (a < 0 || b < 0) {
|
||||
throw new IllegalArgumentException("Make sure all the arguments are greater than zero.");
|
||||
}
|
||||
return a + b;
|
||||
}
|
||||
|
||||
}
|
||||
package com.baeldung.logger;
|
||||
|
||||
public class SampleAdder {
|
||||
|
||||
public int add(int a, int b) {
|
||||
if (a < 0 || b < 0) {
|
||||
throw new IllegalArgumentException("Make sure all the arguments are greater than zero.");
|
||||
}
|
||||
return a + b;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.performancemonitor;
|
||||
package com.baeldung.performancemonitor;
|
||||
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.springframework.aop.Advisor;
|
||||
|
@ -16,10 +16,10 @@ import java.time.Month;
|
|||
@EnableAspectJAutoProxy
|
||||
public class AopConfiguration {
|
||||
|
||||
@Pointcut("execution(public String org.baeldung.performancemonitor.PersonService.getFullName(..))")
|
||||
@Pointcut("execution(public String com.baeldung.performancemonitor.PersonService.getFullName(..))")
|
||||
public void monitor() { }
|
||||
|
||||
@Pointcut("execution(public int org.baeldung.performancemonitor.PersonService.getAge(..))")
|
||||
@Pointcut("execution(public int com.baeldung.performancemonitor.PersonService.getAge(..))")
|
||||
public void myMonitor() { }
|
||||
|
||||
@Bean
|
||||
|
@ -30,7 +30,7 @@ public class AopConfiguration {
|
|||
@Bean
|
||||
public Advisor performanceMonitorAdvisor() {
|
||||
AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
|
||||
pointcut.setExpression("org.baeldung.performancemonitor.AopConfiguration.monitor()");
|
||||
pointcut.setExpression("com.baeldung.performancemonitor.AopConfiguration.monitor()");
|
||||
return new DefaultPointcutAdvisor(pointcut, performanceMonitorInterceptor());
|
||||
}
|
||||
|
||||
|
@ -52,7 +52,7 @@ public class AopConfiguration {
|
|||
@Bean
|
||||
public Advisor myPerformanceMonitorAdvisor() {
|
||||
AspectJExpressionPointcut pointcut = new AspectJExpressionPointcut();
|
||||
pointcut.setExpression("org.baeldung.performancemonitor.AopConfiguration.myMonitor()");
|
||||
pointcut.setExpression("com.baeldung.performancemonitor.AopConfiguration.myMonitor()");
|
||||
return new DefaultPointcutAdvisor(pointcut, myPerformanceMonitorInterceptor());
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.performancemonitor;
|
||||
package com.baeldung.performancemonitor;
|
||||
|
||||
import org.aopalliance.intercept.MethodInvocation;
|
||||
import org.apache.commons.logging.Log;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.performancemonitor;
|
||||
package com.baeldung.performancemonitor;
|
||||
|
||||
import org.springframework.context.ApplicationContext;
|
||||
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.performancemonitor;
|
||||
package com.baeldung.performancemonitor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.performancemonitor;
|
||||
package com.baeldung.performancemonitor;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.Period;
|
|
@ -1,6 +1,6 @@
|
|||
<aspectj>
|
||||
<aspects>
|
||||
<aspect name="org.baeldung.aspectj.SecuredMethodAspect"/>
|
||||
<aspect name="com.baeldung.aspectj.SecuredMethodAspect"/>
|
||||
<weaver options="-verbose -showWeaveInfo">
|
||||
<include within="com.baeldung.aspectj.*"/>
|
||||
</weaver>
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
<!-- in order to debug some marshalling issues, this needs to be TRACE -->
|
||||
<logger name="org.springframework.web.servlet.mvc" level="WARN" />
|
||||
|
||||
<logger name="org.baeldung.performancemonitor.MyPerformanceMonitorInterceptor" level="INFO" />
|
||||
<logger name="com.baeldung.performancemonitor.MyPerformanceMonitorInterceptor" level="INFO" />
|
||||
|
||||
<logger name="org.springframework.aop.interceptor.PerformanceMonitorInterceptor" level="TRACE" />
|
||||
|
||||
|
|
|
@ -6,45 +6,45 @@
|
|||
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.2.xsd">
|
||||
|
||||
<bean id="sampleAdder"
|
||||
class="org.baeldung.logger.SampleAdder" />
|
||||
class="com.baeldung.logger.SampleAdder" />
|
||||
|
||||
<bean id="doBeforeAspect" class="org.baeldung.logger.AdderBeforeAspect" />
|
||||
<bean id="doAfterAspect" class="org.baeldung.logger.AdderAfterAspect" />
|
||||
<bean id="doAfterThrowingAspect" class="org.baeldung.logger.AdderAfterThrowAspect" />
|
||||
<bean id="doAfterReturningAspect" class="org.baeldung.logger.AdderAfterReturnAspect" />
|
||||
<bean id="doAroundAspect" class="org.baeldung.logger.AdderAroundAspect" />
|
||||
<bean id="doBeforeAspect" class="com.baeldung.logger.AdderBeforeAspect" />
|
||||
<bean id="doAfterAspect" class="com.baeldung.logger.AdderAfterAspect" />
|
||||
<bean id="doAfterThrowingAspect" class="com.baeldung.logger.AdderAfterThrowAspect" />
|
||||
<bean id="doAfterReturningAspect" class="com.baeldung.logger.AdderAfterReturnAspect" />
|
||||
<bean id="doAroundAspect" class="com.baeldung.logger.AdderAroundAspect" />
|
||||
|
||||
<aop:config>
|
||||
|
||||
<aop:aspect id="aspects" ref="doBeforeAspect">
|
||||
<aop:pointcut id="pointCutBefore"
|
||||
expression="execution(* org.baeldung.logger.SampleAdder+.*(..))" />
|
||||
expression="execution(* com.baeldung.logger.SampleAdder+.*(..))" />
|
||||
<aop:before method="beforeAdvice" pointcut-ref="pointCutBefore" />
|
||||
</aop:aspect>
|
||||
|
||||
<aop:aspect id="aspects" ref="doAfterAspect">
|
||||
<aop:pointcut id="pointCutAfter"
|
||||
expression="execution(* org.baeldung.logger.SampleAdder+.*(..))" />
|
||||
expression="execution(* com.baeldung.logger.SampleAdder+.*(..))" />
|
||||
<aop:after method="afterAdvice" pointcut-ref="pointCutAfter" />
|
||||
</aop:aspect>
|
||||
|
||||
<aop:aspect id="aspects" ref="doAfterReturningAspect">
|
||||
<aop:pointcut id="pointCutAfterReturning"
|
||||
expression="execution(* org.baeldung.logger.SampleAdder+.*(..))" />
|
||||
expression="execution(* com.baeldung.logger.SampleAdder+.*(..))" />
|
||||
<aop:after-returning method="afterReturn"
|
||||
returning="returnValue" pointcut-ref="pointCutAfterReturning" />
|
||||
</aop:aspect>
|
||||
|
||||
<aop:aspect id="aspects" ref="doAfterThrowingAspect">
|
||||
<aop:pointcut id="pointCutAfterThrowing"
|
||||
expression="execution(* org.baeldung.logger.SampleAdder+.*(..))" />
|
||||
expression="execution(* com.baeldung.logger.SampleAdder+.*(..))" />
|
||||
<aop:after-throwing method="afterThrow"
|
||||
throwing="error" pointcut-ref="pointCutAfterThrowing" />
|
||||
</aop:aspect>
|
||||
|
||||
<aop:aspect id="aspects" ref="doAroundAspect">
|
||||
<aop:pointcut id="pointCutAround"
|
||||
expression="execution(* org.baeldung.logger.SampleAdder+.*(..))" />
|
||||
expression="execution(* com.baeldung.logger.SampleAdder+.*(..))" />
|
||||
<aop:around method="aroundAdvice" pointcut-ref="pointCutAround" />
|
||||
</aop:aspect>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung;
|
||||
package com.baeldung;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung;
|
||||
package com.baeldung;
|
||||
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aspectj;
|
||||
package com.baeldung.aspectj;
|
||||
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aspectj;
|
||||
package com.baeldung.aspectj;
|
||||
|
||||
import org.junit.Test;
|
||||
|
|
@ -1,29 +1,29 @@
|
|||
package org.baeldung.logger;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(value = {"classpath:springAop-applicationContext.xml"})
|
||||
public class CalculatorIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private SampleAdder sampleAdder;
|
||||
|
||||
@Test
|
||||
public void whenAddValidValues_returnsSucessfully() {
|
||||
final int addedValue = sampleAdder.add(12, 12);
|
||||
|
||||
assertEquals(24, addedValue);
|
||||
}
|
||||
|
||||
@Test (expected = IllegalArgumentException.class)
|
||||
public void whenAddInValidValues_throwsException() {
|
||||
sampleAdder.add(12, -12);
|
||||
}
|
||||
|
||||
}
|
||||
package com.baeldung.logger;
|
||||
|
||||
import static org.junit.Assert.assertEquals;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.test.context.ContextConfiguration;
|
||||
import org.springframework.test.context.junit4.SpringJUnit4ClassRunner;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration(value = {"classpath:springAop-applicationContext.xml"})
|
||||
public class CalculatorIntegrationTest {
|
||||
|
||||
@Autowired
|
||||
private SampleAdder sampleAdder;
|
||||
|
||||
@Test
|
||||
public void whenAddValidValues_returnsSucessfully() {
|
||||
final int addedValue = sampleAdder.add(12, 12);
|
||||
|
||||
assertEquals(24, addedValue);
|
||||
}
|
||||
|
||||
@Test (expected = IllegalArgumentException.class)
|
||||
public void whenAddInValidValues_throwsException() {
|
||||
sampleAdder.add(12, -12);
|
||||
}
|
||||
|
||||
}
|
|
@ -6,45 +6,45 @@
|
|||
xsi:schemaLocation="http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-3.2.xsd http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.2.xsd http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.2.xsd http://www.springframework.org/schema/jee http://www.springframework.org/schema/jee/spring-jee-3.2.xsd http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-3.2.xsd http://www.springframework.org/schema/task http://www.springframework.org/schema/task/spring-task-3.2.xsd">
|
||||
|
||||
<bean id="sampleAdder"
|
||||
class="org.baeldung.logger.SampleAdder" />
|
||||
class="com.baeldung.logger.SampleAdder" />
|
||||
|
||||
<bean id="doBeforeAspect" class="org.baeldung.logger.AdderBeforeAspect" />
|
||||
<bean id="doAfterAspect" class="org.baeldung.logger.AdderAfterAspect" />
|
||||
<bean id="doAfterThrowingAspect" class="org.baeldung.logger.AdderAfterThrowAspect" />
|
||||
<bean id="doAfterReturningAspect" class="org.baeldung.logger.AdderAfterReturnAspect" />
|
||||
<bean id="doAroundAspect" class="org.baeldung.logger.AdderAroundAspect" />
|
||||
<bean id="doBeforeAspect" class="com.baeldung.logger.AdderBeforeAspect" />
|
||||
<bean id="doAfterAspect" class="com.baeldung.logger.AdderAfterAspect" />
|
||||
<bean id="doAfterThrowingAspect" class="com.baeldung.logger.AdderAfterThrowAspect" />
|
||||
<bean id="doAfterReturningAspect" class="com.baeldung.logger.AdderAfterReturnAspect" />
|
||||
<bean id="doAroundAspect" class="com.baeldung.logger.AdderAroundAspect" />
|
||||
|
||||
<aop:config>
|
||||
|
||||
<aop:aspect id="aspects" ref="doBeforeAspect">
|
||||
<aop:pointcut id="pointCutBefore"
|
||||
expression="execution(* org.baeldung.logger.SampleAdder+.*(..))" />
|
||||
expression="execution(* com.baeldung.logger.SampleAdder+.*(..))" />
|
||||
<aop:before method="beforeAdvice" pointcut-ref="pointCutBefore" />
|
||||
</aop:aspect>
|
||||
|
||||
<aop:aspect id="aspects" ref="doAfterAspect">
|
||||
<aop:pointcut id="pointCutAfter"
|
||||
expression="execution(* org.baeldung.logger.SampleAdder+.*(..))" />
|
||||
expression="execution(* com.baeldung.logger.SampleAdder+.*(..))" />
|
||||
<aop:after method="afterAdvice" pointcut-ref="pointCutAfter" />
|
||||
</aop:aspect>
|
||||
|
||||
<aop:aspect id="aspects" ref="doAfterReturningAspect">
|
||||
<aop:pointcut id="pointCutAfterReturning"
|
||||
expression="execution(* org.baeldung.logger.SampleAdder+.*(..))" />
|
||||
expression="execution(* com.baeldung.logger.SampleAdder+.*(..))" />
|
||||
<aop:after-returning method="afterReturn"
|
||||
returning="returnValue" pointcut-ref="pointCutAfterReturning" />
|
||||
</aop:aspect>
|
||||
|
||||
<aop:aspect id="aspects" ref="doAfterThrowingAspect">
|
||||
<aop:pointcut id="pointCutAfterThrowing"
|
||||
expression="execution(* org.baeldung.logger.SampleAdder+.*(..))" />
|
||||
expression="execution(* com.baeldung.logger.SampleAdder+.*(..))" />
|
||||
<aop:after-throwing method="afterThrow"
|
||||
throwing="exception" pointcut-ref="pointCutAfterThrowing" />
|
||||
</aop:aspect>
|
||||
|
||||
<aop:aspect id="aspects" ref="doAroundAspect">
|
||||
<aop:pointcut id="pointCutAround"
|
||||
expression="execution(* org.baeldung.logger.SampleAdder+.*(..))" />
|
||||
expression="execution(* com.baeldung.logger.SampleAdder+.*(..))" />
|
||||
<aop:around method="aroundAdvice" pointcut-ref="pointCutAround" />
|
||||
</aop:aspect>
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.config;
|
||||
package com.baeldung.caching.config;
|
||||
|
||||
import org.springframework.cache.Cache;
|
||||
import org.springframework.cache.CacheManager;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.config;
|
||||
package com.baeldung.caching.config;
|
||||
|
||||
import java.util.Arrays;
|
||||
|
||||
|
@ -12,7 +12,7 @@ import org.springframework.context.annotation.Configuration;
|
|||
|
||||
@Configuration
|
||||
@EnableCaching
|
||||
@ComponentScan("org.baeldung.caching.example")
|
||||
@ComponentScan("com.baeldung.caching.example")
|
||||
public class CachingConfig {
|
||||
|
||||
@Bean
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.config;
|
||||
package com.baeldung.caching.config;
|
||||
|
||||
import org.springframework.cache.interceptor.KeyGenerator;
|
||||
import org.springframework.util.StringUtils;
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.caching.eviction.controllers;
|
||||
package com.baeldung.caching.eviction.controllers;
|
||||
|
||||
import org.baeldung.caching.eviction.service.CachingService;
|
||||
import com.baeldung.caching.eviction.service.CachingService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.eviction.service;
|
||||
package com.baeldung.caching.eviction.service;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.CacheManager;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.example;
|
||||
package com.baeldung.caching.example;
|
||||
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.CachePut;
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.caching.example;
|
||||
package com.baeldung.caching.example;
|
||||
|
||||
import org.baeldung.caching.model.Book;
|
||||
import com.baeldung.caching.model.Book;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.example;
|
||||
package com.baeldung.caching.example;
|
||||
|
||||
public class Customer {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.example;
|
||||
package com.baeldung.caching.example;
|
||||
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.example;
|
||||
package com.baeldung.caching.example;
|
||||
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.model;
|
||||
package com.baeldung.caching.model;
|
||||
|
||||
public class Book {
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.ehcache.calculator;
|
||||
package com.baeldung.ehcache.calculator;
|
||||
|
||||
import org.baeldung.ehcache.config.CacheHelper;
|
||||
import com.baeldung.ehcache.config.CacheHelper;
|
||||
|
||||
public class SquaredCalculator {
|
||||
private CacheHelper cache;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.ehcache.config;
|
||||
package com.baeldung.ehcache.config;
|
||||
|
||||
import org.ehcache.Cache;
|
||||
import org.ehcache.CacheManager;
|
|
@ -13,7 +13,7 @@
|
|||
<!-- <context:annotation-config/> -->
|
||||
|
||||
<!-- the service that you wish to make cacheable. -->
|
||||
<bean id="customerDataService" class="org.baeldung.caching.example.CustomerDataService"/>
|
||||
<bean id="customerDataService" class="com.baeldung.caching.example.CustomerDataService"/>
|
||||
|
||||
<bean id="cacheManager" class="org.springframework.cache.support.SimpleCacheManager">
|
||||
<property name="caches">
|
||||
|
@ -34,7 +34,7 @@
|
|||
|
||||
<!-- apply the behavior to all the implementations of CustomerDataService -->
|
||||
<aop:config>
|
||||
<aop:advisor advice-ref="cachingBehavior" pointcut="execution(* org.baeldung.caching.example.CustomerDataService.*(..))"/>
|
||||
<aop:advisor advice-ref="cachingBehavior" pointcut="execution(* com.baeldung.caching.example.CustomerDataService.*(..))"/>
|
||||
</aop:config>
|
||||
|
||||
</beans>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.test;
|
||||
package com.baeldung.caching.test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.nullValue;
|
||||
|
@ -7,7 +7,7 @@ import static org.junit.Assert.assertThat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.baeldung.caching.eviction.service.CachingService;
|
||||
import com.baeldung.caching.eviction.service.CachingService;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.caching.test;
|
||||
package com.baeldung.caching.test;
|
||||
|
||||
import static org.hamcrest.CoreMatchers.is;
|
||||
import static org.hamcrest.CoreMatchers.nullValue;
|
||||
|
@ -7,7 +7,7 @@ import static org.junit.Assert.assertThat;
|
|||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
import org.baeldung.caching.eviction.service.CachingService;
|
||||
import com.baeldung.caching.eviction.service.CachingService;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.caching.test;
|
||||
package com.baeldung.caching.test;
|
||||
|
||||
import org.baeldung.caching.config.CachingConfig;
|
||||
import org.baeldung.caching.example.Customer;
|
||||
import org.baeldung.caching.example.CustomerDataService;
|
||||
import org.baeldung.caching.example.CustomerServiceWithParent;
|
||||
import com.baeldung.caching.config.CachingConfig;
|
||||
import com.baeldung.caching.example.Customer;
|
||||
import com.baeldung.caching.example.CustomerDataService;
|
||||
import com.baeldung.caching.example.CustomerServiceWithParent;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
@ -1,7 +1,7 @@
|
|||
package org.baeldung.ehcache;
|
||||
package com.baeldung.ehcache;
|
||||
|
||||
import org.baeldung.ehcache.calculator.SquaredCalculator;
|
||||
import org.baeldung.ehcache.config.CacheHelper;
|
||||
import com.baeldung.ehcache.calculator.SquaredCalculator;
|
||||
import com.baeldung.ehcache.config.CacheHelper;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.persistence;
|
||||
package com.baeldung.persistence;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.persistence.dao;
|
||||
package com.baeldung.persistence.dao;
|
||||
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import com.baeldung.persistence.model.Foo;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.data.repository.query.Param;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.persistence.model;
|
||||
package com.baeldung.persistence.model;
|
||||
|
||||
import java.io.Serializable;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.persistence.model;
|
||||
package com.baeldung.persistence.model;
|
||||
|
||||
import javax.persistence.Entity;
|
||||
import javax.persistence.GeneratedValue;
|
|
@ -0,0 +1,10 @@
|
|||
package com.baeldung.persistence.service;
|
||||
|
||||
import com.baeldung.persistence.model.Foo;
|
||||
import com.baeldung.persistence.IOperations;
|
||||
|
||||
public interface IFooService extends IOperations<Foo> {
|
||||
|
||||
Foo retrieveByName(String name);
|
||||
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.persistence.service.common;
|
||||
package com.baeldung.persistence.service.common;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import org.baeldung.persistence.IOperations;
|
||||
import com.baeldung.persistence.IOperations;
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.persistence.service.impl;
|
||||
package com.baeldung.persistence.service.impl;
|
||||
|
||||
import org.baeldung.persistence.dao.IFooDao;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import org.baeldung.persistence.service.IFooService;
|
||||
import org.baeldung.persistence.service.common.AbstractService;
|
||||
import com.baeldung.persistence.dao.IFooDao;
|
||||
import com.baeldung.persistence.model.Foo;
|
||||
import com.baeldung.persistence.service.IFooService;
|
||||
import com.baeldung.persistence.service.common.AbstractService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.data.repository.PagingAndSortingRepository;
|
||||
import org.springframework.stereotype.Service;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring;
|
||||
package com.baeldung.spring;
|
||||
|
||||
import javax.servlet.ServletContext;
|
||||
import javax.servlet.ServletException;
|
||||
|
@ -19,7 +19,7 @@ import org.springframework.web.context.request.RequestContextListener;
|
|||
*/
|
||||
@EnableScheduling
|
||||
@EnableAutoConfiguration
|
||||
@ComponentScan("org.baeldung")
|
||||
@ComponentScan("com.baeldung")
|
||||
@SpringBootApplication
|
||||
public class Application extends SpringBootServletInitializer {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring;
|
||||
package com.baeldung.spring;
|
||||
|
||||
import java.util.Properties;
|
||||
|
||||
|
@ -24,9 +24,9 @@ import com.google.common.base.Preconditions;
|
|||
@Configuration
|
||||
@EnableTransactionManagement
|
||||
@PropertySource({ "classpath:persistence-${envTarget:h2}.properties" })
|
||||
@ComponentScan({ "org.baeldung.persistence" })
|
||||
@ComponentScan({ "com.baeldung.persistence" })
|
||||
// @ImportResource("classpath*:springDataPersistenceConfig.xml")
|
||||
@EnableJpaRepositories(basePackages = "org.baeldung.persistence.dao")
|
||||
@EnableJpaRepositories(basePackages = "com.baeldung.persistence.dao")
|
||||
public class PersistenceConfig {
|
||||
|
||||
@Autowired
|
||||
|
@ -40,7 +40,7 @@ public class PersistenceConfig {
|
|||
public LocalContainerEntityManagerFactoryBean entityManagerFactory() {
|
||||
final LocalContainerEntityManagerFactoryBean em = new LocalContainerEntityManagerFactoryBean();
|
||||
em.setDataSource(dataSource());
|
||||
em.setPackagesToScan(new String[] { "org.baeldung.persistence.model" });
|
||||
em.setPackagesToScan(new String[] { "com.baeldung.persistence.model" });
|
||||
|
||||
final HibernateJpaVendorAdapter vendorAdapter = new HibernateJpaVendorAdapter();
|
||||
// vendorAdapter.set
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring;
|
||||
package com.baeldung.spring;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
@ -10,7 +10,7 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
|||
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan("org.baeldung.web")
|
||||
@ComponentScan("com.baeldung.web")
|
||||
@EnableWebMvc
|
||||
public class WebConfig implements WebMvcConfigurer {
|
||||
|
|
@ -1,12 +1,12 @@
|
|||
package org.baeldung.web.controller;
|
||||
package com.baeldung.web.controller;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import javax.servlet.http.HttpServletResponse;
|
||||
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import org.baeldung.persistence.service.IFooService;
|
||||
import org.baeldung.web.util.RestPreconditions;
|
||||
import com.baeldung.persistence.model.Foo;
|
||||
import com.baeldung.persistence.service.IFooService;
|
||||
import com.baeldung.web.util.RestPreconditions;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.http.HttpStatus;
|
||||
import org.springframework.http.MediaType;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.controller;
|
||||
package com.baeldung.web.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.web.controller;
|
||||
package com.baeldung.web.controller;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
import org.baeldung.web.metric.IActuatorMetricService;
|
||||
import org.baeldung.web.metric.IMetricService;
|
||||
import com.baeldung.web.metric.IActuatorMetricService;
|
||||
import com.baeldung.web.metric.IMetricService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.exception;
|
||||
package com.baeldung.web.exception;
|
||||
|
||||
public final class MyResourceNotFoundException extends RuntimeException {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.metric;
|
||||
package com.baeldung.web.metric;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.metric;
|
||||
package com.baeldung.web.metric;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.ArrayList;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.metric;
|
||||
package com.baeldung.web.metric;
|
||||
|
||||
public interface IActuatorMetricService {
|
||||
Object[][] getGraphData();
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.metric;
|
||||
package com.baeldung.web.metric;
|
||||
|
||||
public interface ICustomActuatorMetricService {
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.metric;
|
||||
package com.baeldung.web.metric;
|
||||
|
||||
import java.util.Map;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.metric;
|
||||
package com.baeldung.web.metric;
|
||||
|
||||
import javax.servlet.Filter;
|
||||
import javax.servlet.FilterChain;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.metric;
|
||||
package com.baeldung.web.metric;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
import java.util.Date;
|
|
@ -1,9 +1,8 @@
|
|||
package org.baeldung.web.util;
|
||||
package com.baeldung.web.util;
|
||||
|
||||
import com.baeldung.web.exception.MyResourceNotFoundException;
|
||||
import org.springframework.http.HttpStatus;
|
||||
|
||||
import org.baeldung.web.exception.MyResourceNotFoundException;
|
||||
|
||||
/**
|
||||
* Simple static methods to be called at the start of your own methods to verify correct arguments and state. If the Precondition fails, an {@link HttpStatus} code is thrown
|
||||
*/
|
|
@ -1,10 +0,0 @@
|
|||
package org.baeldung.persistence.service;
|
||||
|
||||
import org.baeldung.persistence.IOperations;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
|
||||
public interface IFooService extends IOperations<Foo> {
|
||||
|
||||
Foo retrieveByName(String name);
|
||||
|
||||
}
|
|
@ -7,6 +7,6 @@
|
|||
http://www.springframework.org/schema/data/jpa/spring-jpa.xsd"
|
||||
>
|
||||
|
||||
<jpa:repositories base-package="org.baeldung.persistence.dao"/>
|
||||
<jpa:repositories base-package="com.baeldung.persistence.dao"/>
|
||||
|
||||
</beans>
|
|
@ -16,7 +16,7 @@
|
|||
</context-param>
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>org.baeldung.spring</param-value>
|
||||
<param-value>com.baeldung.spring</param-value>
|
||||
</context-param>
|
||||
|
||||
<listener>
|
||||
|
@ -37,7 +37,7 @@
|
|||
<!-- Metric filter -->
|
||||
<filter>
|
||||
<filter-name>metricFilter</filter-name>
|
||||
<filter-class>org.baeldung.web.metric.MetricFilter</filter-class>
|
||||
<filter-class>com.baeldung.web.metric.MetricFilter</filter-class>
|
||||
</filter>
|
||||
|
||||
<filter-mapping>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung;
|
||||
package com.baeldung;
|
||||
|
||||
public interface Consts {
|
||||
int APPLICATION_PORT = 8082;
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung;
|
||||
package com.baeldung;
|
||||
|
||||
import org.baeldung.spring.Application;
|
||||
import com.baeldung.spring.Application;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung;
|
||||
package com.baeldung;
|
||||
|
||||
import org.baeldung.spring.Application;
|
||||
import com.baeldung.spring.Application;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.springframework.boot.test.context.SpringBootTest;
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.persistence;
|
||||
package com.baeldung.persistence;
|
||||
|
||||
import org.baeldung.persistence.service.FooServicePersistenceIntegrationTest;
|
||||
import com.baeldung.persistence.service.FooServicePersistenceIntegrationTest;
|
||||
import org.junit.runner.RunWith;
|
||||
import org.junit.runners.Suite;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.persistence.service;
|
||||
package com.baeldung.persistence.service;
|
||||
|
||||
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
|
||||
import static org.hamcrest.Matchers.hasItem;
|
||||
|
@ -11,9 +11,9 @@ import static org.junit.Assert.assertThat;
|
|||
import java.io.Serializable;
|
||||
import java.util.List;
|
||||
|
||||
import org.baeldung.persistence.IOperations;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import org.baeldung.util.IDUtil;
|
||||
import com.baeldung.util.IDUtil;
|
||||
import com.baeldung.persistence.IOperations;
|
||||
import com.baeldung.persistence.model.Foo;
|
||||
import org.hamcrest.Matchers;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
|
@ -1,11 +1,11 @@
|
|||
package org.baeldung.persistence.service;
|
||||
package com.baeldung.persistence.service;
|
||||
|
||||
import static org.apache.commons.lang3.RandomStringUtils.randomAlphabetic;
|
||||
import static org.junit.Assert.assertNotNull;
|
||||
|
||||
import org.baeldung.persistence.IOperations;
|
||||
import org.baeldung.persistence.model.Foo;
|
||||
import org.baeldung.spring.PersistenceConfig;
|
||||
import com.baeldung.persistence.IOperations;
|
||||
import com.baeldung.persistence.model.Foo;
|
||||
import com.baeldung.spring.PersistenceConfig;
|
||||
import org.junit.Ignore;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.util;
|
||||
package com.baeldung.util;
|
||||
|
||||
import java.util.Random;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.shell;
|
||||
package com.baeldung.shell;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.springframework.shell.Bootstrap;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.shell.simple;
|
||||
package com.baeldung.shell.simple;
|
||||
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.shell.simple;
|
||||
package com.baeldung.shell.simple;
|
||||
|
||||
import java.io.BufferedReader;
|
||||
import java.io.FileNotFoundException;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.shell.simple;
|
||||
package com.baeldung.shell.simple;
|
||||
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.shell.simple;
|
||||
package com.baeldung.shell.simple;
|
||||
|
||||
import org.springframework.core.Ordered;
|
||||
import org.springframework.core.annotation.Order;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.shell.simple;
|
||||
package com.baeldung.shell.simple;
|
||||
|
||||
import java.net.MalformedURLException;
|
||||
import java.net.URL;
|
|
@ -8,6 +8,6 @@
|
|||
http://www.springframework.org/schema/util http://www.springframework.org/schema/util/spring-util-4.2.xsd
|
||||
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-4.2.xsd">
|
||||
|
||||
<context:component-scan base-package="org.baeldung.shell.simple"/>
|
||||
<context:component-scan base-package="com.baeldung.shell.simple"/>
|
||||
|
||||
</beans>
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.shell.simple;
|
||||
package com.baeldung.shell.simple;
|
||||
|
||||
import org.junit.AfterClass;
|
||||
import org.junit.Assert;
|
Loading…
Reference in New Issue