diff --git a/src/com/atuldwivedi/carcentre/aspect/LoggingAspect.java b/src/com/atuldwivedi/carcentre/aspect/LoggingAspect.java index 5de36a9..613cd68 100644 --- a/src/com/atuldwivedi/carcentre/aspect/LoggingAspect.java +++ b/src/com/atuldwivedi/carcentre/aspect/LoggingAspect.java @@ -9,8 +9,8 @@ import org.aspectj.lang.annotation.Pointcut; import org.springframework.stereotype.Component; -//@Aspect -//@Component +@Aspect +@Component public class LoggingAspect { @Pointcut("execution(* com.atuldwivedi.carcentre.*.*.*(..))") diff --git a/src/com/atuldwivedi/carcentre/aspect/MyLogginAspect.java b/src/com/atuldwivedi/carcentre/aspect/MyLogginAspect.java index dc259a9..3c4f432 100644 --- a/src/com/atuldwivedi/carcentre/aspect/MyLogginAspect.java +++ b/src/com/atuldwivedi/carcentre/aspect/MyLogginAspect.java @@ -19,11 +19,11 @@ public class MyLogginAspect { @Pointcut("execution(* com.atuldwivedi.carcentre.*.*.*(..))") public void allMethods() {} - /*@Before("allMethods()") + @Before("allMethods()") @Order(2) public void runBeforeEveryMethod(JoinPoint joinPoint) { System.out.println("1>> "+this.getClass().getSimpleName()+" "+joinPoint.getSignature()+" started"); - }*/ + } /*@Before("allMethods()") @Order(1) @@ -69,7 +69,7 @@ public Object aroundSaveOrUpdate(ProceedingJoinPoint proceedingJoinPoint) throws return result; } - @AfterThrowing(pointcut="allMethods()", throwing="ex") + //@AfterThrowing(pointcut="allMethods()", throwing="ex") public void afterTrowing(Throwable ex) { System.out.println("----------------\n"+ex.getMessage()); } diff --git a/src/com/atuldwivedi/carcentre/aspect/MyLogginAspect2.java b/src/com/atuldwivedi/carcentre/aspect/MyLogginAspect2.java index 29ce51a..55e2ddd 100644 --- a/src/com/atuldwivedi/carcentre/aspect/MyLogginAspect2.java +++ b/src/com/atuldwivedi/carcentre/aspect/MyLogginAspect2.java @@ -8,9 +8,9 @@ import org.springframework.core.annotation.Order; import org.springframework.stereotype.Component; -//@Aspect -//@Component -//@Order(1) +@Aspect +@Component +@Order(1) public class MyLogginAspect2 { @Pointcut("execution(* com.atuldwivedi.carcentre.*.*.*(..))") diff --git a/src/com/atuldwivedi/carcentre/controller/rest/GreetController.java b/src/com/atuldwivedi/carcentre/controller/rest/GreetController.java index 2d672af..0a05ab1 100644 --- a/src/com/atuldwivedi/carcentre/controller/rest/GreetController.java +++ b/src/com/atuldwivedi/carcentre/controller/rest/GreetController.java @@ -13,12 +13,12 @@ import com.atuldwivedi.carcentre.domain.Message; -@RestController +//@RestController public class GreetController implements Serializable { private Map msgMap; - @PostConstruct + //@PostConstruct public void createData() { msgMap = new HashMap(); msgMap.put("mor", new Message("Morning", "Good Morning!")); @@ -26,7 +26,7 @@ public void createData() { msgMap.put("eve", new Message("Evening", "Good Evening!")); } - @RequestMapping(value="/greet", method=RequestMethod.GET) + //@RequestMapping(value="/greet", method=RequestMethod.GET) public Message greetMe(/*@RequestParam("time") String theTime*/) { return msgMap.get("eve"); } diff --git a/src/com/atuldwivedi/carcentre/dao/CustomerDaoImpl.java b/src/com/atuldwivedi/carcentre/dao/CustomerDaoImpl.java index 1883925..1af4eb7 100644 --- a/src/com/atuldwivedi/carcentre/dao/CustomerDaoImpl.java +++ b/src/com/atuldwivedi/carcentre/dao/CustomerDaoImpl.java @@ -8,7 +8,6 @@ import org.hibernate.query.Query; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Repository; -import org.springframework.transaction.annotation.Transactional; import com.atuldwivedi.carcentre.user.Customer; @@ -59,7 +58,6 @@ public Long addCustomerOld(Customer customer) { @Override public Long editCustomer(Customer customer) { - // TODO Auto-generated method stub return null; }