Rename package
This commit is contained in:
parent
44eca5ba04
commit
9630170b03
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aop;
|
||||
package com.baeldung.aop;
|
||||
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
|
@ -27,11 +27,11 @@ public class LoggingAspect {
|
|||
public void repositoryMethods() {
|
||||
}
|
||||
|
||||
@Pointcut("@annotation(org.baeldung.aop.annotations.Loggable)")
|
||||
@Pointcut("@annotation(com.baeldung.aop.annotations.Loggable)")
|
||||
public void loggableMethods() {
|
||||
}
|
||||
|
||||
@Pointcut("@args(org.baeldung.aop.annotations.Entity)")
|
||||
@Pointcut("@args(com.baeldung.aop.annotations.Entity)")
|
||||
public void methodsAcceptingEntities() {
|
||||
}
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aop;
|
||||
package com.baeldung.aop;
|
||||
|
||||
import org.aspectj.lang.ProceedingJoinPoint;
|
||||
import org.aspectj.lang.annotation.Around;
|
|
@ -1,10 +1,10 @@
|
|||
package org.baeldung.aop;
|
||||
package com.baeldung.aop;
|
||||
|
||||
import com.baeldung.events.FooCreationEvent;
|
||||
import org.aspectj.lang.JoinPoint;
|
||||
import org.aspectj.lang.annotation.AfterReturning;
|
||||
import org.aspectj.lang.annotation.Aspect;
|
||||
import org.aspectj.lang.annotation.Pointcut;
|
||||
import org.baeldung.events.FooCreationEvent;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.ApplicationEventPublisher;
|
||||
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aop.annotations;
|
||||
package com.baeldung.aop.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.aop.annotations;
|
||||
package com.baeldung.aop.annotations;
|
||||
|
||||
import java.lang.annotation.ElementType;
|
||||
import java.lang.annotation.Retention;
|
|
@ -1,7 +1,7 @@
|
|||
package org.baeldung.dao;
|
||||
package com.baeldung.dao;
|
||||
|
||||
import org.baeldung.aop.annotations.Loggable;
|
||||
import org.baeldung.model.Foo;
|
||||
import com.baeldung.aop.annotations.Loggable;
|
||||
import com.baeldung.model.Foo;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
@Repository
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.dialect;
|
||||
package com.baeldung.dialect;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.baeldung.processor.NameProcessor;
|
||||
import com.baeldung.processor.NameProcessor;
|
||||
import org.thymeleaf.dialect.AbstractDialect;
|
||||
import org.thymeleaf.processor.IProcessor;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.events;
|
||||
package com.baeldung.events;
|
||||
|
||||
import org.springframework.context.ApplicationEvent;
|
||||
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.events;
|
||||
package com.baeldung.events;
|
||||
|
||||
import org.springframework.context.ApplicationListener;
|
||||
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.model;
|
||||
package com.baeldung.model;
|
||||
|
||||
import javax.xml.bind.annotation.XmlRootElement;
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.model;
|
||||
package com.baeldung.model;
|
||||
|
||||
import org.baeldung.aop.annotations.Entity;
|
||||
import com.baeldung.aop.annotations.Entity;
|
||||
|
||||
@Entity
|
||||
public class Foo {
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.model;
|
||||
package com.baeldung.model;
|
||||
|
||||
public class User {
|
||||
private String firstname;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.processor;
|
||||
package com.baeldung.processor;
|
||||
|
||||
import org.thymeleaf.Arguments;
|
||||
import org.thymeleaf.dom.Element;
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.spring.web.config;
|
||||
package com.baeldung.spring.web.config;
|
||||
|
||||
import java.util.HashSet;
|
||||
import java.util.Set;
|
||||
|
||||
import org.baeldung.dialect.CustomDialect;
|
||||
import com.baeldung.dialect.CustomDialect;
|
||||
import org.springframework.context.MessageSource;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.web.config;
|
||||
package com.baeldung.spring.web.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.web.config;
|
||||
package com.baeldung.spring.web.config;
|
||||
|
||||
import java.util.Set;
|
||||
|
||||
|
@ -25,7 +25,7 @@ public class MainWebAppInitializer implements WebApplicationInitializer {
|
|||
|
||||
// Create the 'root' Spring application context
|
||||
final AnnotationConfigWebApplicationContext root = new AnnotationConfigWebApplicationContext();
|
||||
root.scan("org.baeldung.spring.web.config");
|
||||
root.scan("com.baeldung.spring.web.config");
|
||||
// root.getEnvironment().setDefaultProfiles("embedded");
|
||||
|
||||
// Manages the lifecycle of the root application context
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.spring.web.config;
|
||||
package com.baeldung.spring.web.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
|
@ -16,7 +16,7 @@ import org.springframework.web.servlet.view.XmlViewResolver;
|
|||
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
@ComponentScan("org.baeldung.web")
|
||||
@ComponentScan("com.baeldung.web")
|
||||
public class WebConfig extends WebMvcConfigurerAdapter {
|
||||
|
||||
public WebConfig() {
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web;
|
||||
package com.baeldung.web;
|
||||
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Component;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web;
|
||||
package com.baeldung.web;
|
||||
|
||||
import org.springframework.stereotype.Component;
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.web.controller;
|
||||
package com.baeldung.web.controller;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.baeldung.model.Employee;
|
||||
import com.baeldung.model.Employee;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
||||
import org.springframework.validation.BindingResult;
|
|
@ -1,4 +1,4 @@
|
|||
package org.baeldung.web.controller;
|
||||
package com.baeldung.web.controller;
|
||||
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.ModelMap;
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.web.controller;
|
||||
package com.baeldung.web.controller;
|
||||
|
||||
import org.baeldung.model.User;
|
||||
import com.baeldung.model.User;
|
||||
import org.springframework.stereotype.Controller;
|
||||
import org.springframework.ui.Model;
|
||||
import org.springframework.web.bind.annotation.ModelAttribute;
|
|
@ -1,116 +0,0 @@
|
|||
package org.baeldung.spring.web.config;
|
||||
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.core.io.ClassPathResource;
|
||||
import org.springframework.web.multipart.commons.CommonsMultipartResolver;
|
||||
import org.springframework.web.servlet.ViewResolver;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurerAdapter;
|
||||
import org.springframework.web.servlet.view.InternalResourceViewResolver;
|
||||
import org.springframework.web.servlet.view.JstlView;
|
||||
import org.springframework.web.servlet.view.ResourceBundleViewResolver;
|
||||
import org.springframework.web.servlet.view.XmlViewResolver;
|
||||
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
@ComponentScan("org.baeldung.web")
|
||||
public class WebConfig extends WebMvcConfigurerAdapter {
|
||||
|
||||
<<<<<<< HEAD
|
||||
public WebConfig() {
|
||||
super();
|
||||
}
|
||||
|
||||
//
|
||||
|
||||
@Override
|
||||
public void addViewControllers(final ViewControllerRegistry registry) {
|
||||
super.addViewControllers(registry);
|
||||
registry.addViewController("/sample.html");
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ViewResolver internalResourceViewResolver() {
|
||||
final InternalResourceViewResolver bean = new InternalResourceViewResolver();
|
||||
bean.setViewClass(JstlView.class);
|
||||
bean.setPrefix("/WEB-INF/view/");
|
||||
bean.setSuffix(".jsp");
|
||||
bean.setOrder(2);
|
||||
return bean;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ViewResolver xmlViewResolver() {
|
||||
final XmlViewResolver bean = new XmlViewResolver();
|
||||
bean.setLocation(new ClassPathResource("views.xml"));
|
||||
bean.setOrder(1);
|
||||
return bean;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ViewResolver resourceBundleViewResolver() {
|
||||
final ResourceBundleViewResolver bean = new ResourceBundleViewResolver();
|
||||
bean.setBasename("views");
|
||||
bean.setOrder(0);
|
||||
return bean;
|
||||
}
|
||||
|
||||
=======
|
||||
public WebConfig() {
|
||||
super();
|
||||
}
|
||||
|
||||
// @Bean
|
||||
// public StandardServletMultipartResolver multipartResolver() {
|
||||
// return new StandardServletMultipartResolver();
|
||||
// }
|
||||
|
||||
@Bean(name = "multipartResolver")
|
||||
public CommonsMultipartResolver multipartResolver() {
|
||||
|
||||
final CommonsMultipartResolver multipartResolver = new CommonsMultipartResolver();
|
||||
multipartResolver.setMaxUploadSize(100000);
|
||||
|
||||
return multipartResolver;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addViewControllers(final ViewControllerRegistry registry) {
|
||||
|
||||
super.addViewControllers(registry);
|
||||
registry.addViewController("/sample.html");
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ViewResolver internalResourceViewResolver() {
|
||||
|
||||
final InternalResourceViewResolver bean = new InternalResourceViewResolver();
|
||||
bean.setViewClass(JstlView.class);
|
||||
bean.setPrefix("/WEB-INF/view/");
|
||||
bean.setSuffix(".jsp");
|
||||
bean.setOrder(2);
|
||||
return bean;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ViewResolver xmlViewResolver() {
|
||||
|
||||
final XmlViewResolver bean = new XmlViewResolver();
|
||||
bean.setLocation(new ClassPathResource("views.xml"));
|
||||
bean.setOrder(1);
|
||||
return bean;
|
||||
}
|
||||
|
||||
@Bean
|
||||
public ViewResolver resourceBundleViewResolver() {
|
||||
|
||||
final ResourceBundleViewResolver bean = new ResourceBundleViewResolver();
|
||||
bean.setBasename("views");
|
||||
bean.setOrder(0);
|
||||
return bean;
|
||||
}
|
||||
>>>>>>> 3061fc7c0f9b17bf517259154900e9a70a0c512b
|
||||
}
|
|
@ -7,8 +7,8 @@
|
|||
http://www.springframework.org/schema/aop
|
||||
http://www.springframework.org/schema/aop/spring-aop-4.2.xsd">
|
||||
|
||||
<bean id="perfomanceMeter" class="org.baeldung.aop.PerformanceAspect"/>
|
||||
<bean id="fooDao" class="org.baeldung.dao.FooDao"/>
|
||||
<bean id="perfomanceMeter" class="com.baeldung.aop.PerformanceAspect"/>
|
||||
<bean id="fooDao" class="com.baeldung.dao.FooDao"/>
|
||||
|
||||
<aop:config>
|
||||
<aop:pointcut id="anyDaoMethod" expression="@target(org.springframework.stereotype.Repository)"/>
|
|
@ -16,7 +16,7 @@
|
|||
</context-param>
|
||||
<context-param>
|
||||
<param-name>contextConfigLocation</param-name>
|
||||
<param-value>org.baeldung.spring.web.config</param-value>
|
||||
<param-value>com.baeldung.spring.web.config</param-value>
|
||||
</context-param>
|
||||
|
||||
<listener>
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
package org.baeldung.aop;
|
||||
package com.baeldung.aop;
|
||||
|
||||
import org.baeldung.config.TestConfig;
|
||||
import org.baeldung.dao.FooDao;
|
||||
import org.baeldung.model.Foo;
|
||||
import com.baeldung.config.TestConfig;
|
||||
import com.baeldung.dao.FooDao;
|
||||
import com.baeldung.model.Foo;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
|
@ -1,7 +1,7 @@
|
|||
package org.baeldung.aop;
|
||||
package com.baeldung.aop;
|
||||
|
||||
import org.baeldung.config.TestConfig;
|
||||
import org.baeldung.dao.FooDao;
|
||||
import com.baeldung.config.TestConfig;
|
||||
import com.baeldung.dao.FooDao;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
|
@ -1,9 +1,9 @@
|
|||
package org.baeldung.aop;
|
||||
package com.baeldung.aop;
|
||||
|
||||
import org.baeldung.config.TestConfig;
|
||||
import org.baeldung.dao.FooDao;
|
||||
import org.baeldung.events.FooCreationEventListener;
|
||||
import org.baeldung.model.Foo;
|
||||
import com.baeldung.config.TestConfig;
|
||||
import com.baeldung.dao.FooDao;
|
||||
import com.baeldung.events.FooCreationEventListener;
|
||||
import com.baeldung.model.Foo;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
|
@ -1,6 +1,6 @@
|
|||
package org.baeldung.aop;
|
||||
package com.baeldung.aop;
|
||||
|
||||
import org.baeldung.dao.FooDao;
|
||||
import com.baeldung.dao.FooDao;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
import org.junit.runner.RunWith;
|
||||
|
@ -21,7 +21,7 @@ import static org.junit.Assert.assertThat;
|
|||
import static org.junit.Assert.assertTrue;
|
||||
|
||||
@RunWith(SpringJUnit4ClassRunner.class)
|
||||
@ContextConfiguration("/org/baeldung/aop/beans.xml")
|
||||
@ContextConfiguration("/com/baeldung/aop/beans.xml")
|
||||
public class AopXmlConfigPerformanceTest {
|
||||
|
||||
@Before
|
|
@ -1,11 +1,11 @@
|
|||
package org.baeldung.config;
|
||||
package com.baeldung.config;
|
||||
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.context.annotation.EnableAspectJAutoProxy;
|
||||
|
||||
@Configuration
|
||||
@ComponentScan(basePackages = { "org.baeldung.dao", "org.baeldung.aop", "org.baeldung.events" })
|
||||
@ComponentScan(basePackages = { "com.baeldung.dao", "com.baeldung.aop", "com.baeldung.events" })
|
||||
@EnableAspectJAutoProxy
|
||||
public class TestConfig {
|
||||
}
|
Loading…
Reference in New Issue