This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.telcel.aspects; | |
import org.aspectj.lang.ProceedingJoinPoint; | |
import org.aspectj.lang.annotation.Around; | |
import org.aspectj.lang.annotation.Aspect; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.stereotype.Component; | |
import org.springframework.util.StopWatch; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.telcel.aspects; | |
import org.aspectj.lang.annotation.AfterThrowing; | |
import org.aspectj.lang.annotation.Aspect; | |
import org.slf4j.Logger; | |
import org.slf4j.LoggerFactory; | |
import org.springframework.stereotype.Component; | |
@Component | |
@Aspect |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.telcel.aspects; | |
public class CallTracker { | |
private boolean called; | |
public boolean isCalled() { | |
return called; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.aspectj.lang.annotation.Pointcut; | |
public class SystemArchitecture { | |
@Pointcut("execution(* (@org.springframework.stereotype.Repository *).*(..))") | |
public void Repository() { | |
} | |
@Pointcut("execution(* (@org.springframework.stereotype.Service *).*(..))") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<configuration> | |
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender"> | |
<encoder> | |
<pattern>[%thread] %-5level %logger{36} - %msg%n</pattern> | |
</encoder> | |
</appender> | |
<root level="trace"> | |
<appender-ref ref="STDOUT" /> | |
</root> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> | |
<modelVersion>4.0.0</modelVersion> | |
<groupId>com.ewolff.aop</groupId> | |
<artifactId>m04-your-first-aspect-start</artifactId> | |
<version>0.0.1-SNAPSHOT</version> | |
<properties> | |
<java.version>1.6</java.version> | |
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<resources location="/, classpath:META-INF/web-resources/" mapping="/resources/**"/> | |
<default-servlet-handler/> | |
<interceptors> | |
<beans:bean class="org.springframework.web.servlet.theme.ThemeChangeInterceptor"/> | |
<beans:bean class="org.springframework.web.servlet.i18n.LocaleChangeInterceptor" p:paramName="lang"/> | |
</interceptors> | |
<beans:bean class="org.springframework.context.support.ReloadableResourceBundleMessageSource" id="messageSource" p:basenames="WEB-INF/i18n/messages,WEB-INF/i18n/application" p:fallbackToSystemLocale="false"/> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<beans xmlns="http://www.springframework.org/schema/beans" | |
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns:context="http://www.springframework.org/schema/context" | |
xmlns:jdbc="http://www.springframework.org/schema/jdbc" | |
xmlns:jpa="http://www.springframework.org/schema/data/jpa" | |
xmlns:tx="http://www.springframework.org/schema/tx" | |
xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.1.xsd | |
http://www.springframework.org/schema/context http://www.springframework.org/schema/context/spring-context-3.1.xsd | |
http://www.springframework.org/schema/jdbc http://www.springframework.org/schema/jdbc/spring-jdbc-3.1.xsd |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
insert into contact (first_name, last_name, birth_date) values ('Clarence', 'Ho', '1980-07-30'); | |
insert into contact (first_name, last_name, birth_date) values ('Scott', 'Tiger', '1990-11-02'); | |
insert into contact (first_name, last_name, birth_date) values ('John', 'Smith', '1964-02-28'); | |
insert into contact_tel_detail (contact_id, tel_type, tel_number) values (1, 'Mobile', '1234567890'); | |
insert into contact_tel_detail (contact_id, tel_type, tel_number) values (1, 'Home', '1234567890'); | |
insert into contact_tel_detail (contact_id, tel_type, tel_number) values (2, 'Home', '1234567890'); | |
insert into hobby (hobby_id) values ('Swimming'); | |
insert into hobby (hobby_id) values ('Jogging'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
DROP TABLE IF EXISTS CONTACT_HOBBY_DETAIL; | |
DROP TABLE IF EXISTS CONTACT_TEL_DETAIL; | |
DROP TABLE IF EXISTS HOBBY; | |
DROP TABLE IF EXISTS CONTACT; | |
DROP TABLE IF EXISTS CONTACT_AUDIT; | |
CREATE TABLE CONTACT ( | |
ID INT NOT NULL AUTO_INCREMENT | |
, FIRST_NAME VARCHAR(60) NOT NULL | |
, LAST_NAME VARCHAR(40) NOT NULL |