3 back-end development

@RequestMapping (path = { "/", "/ index"}) url request path

@RequestBody return non-template, template To return the html or php can be deleted

 

@RequestMapping (path = { "/ profile / {groupId} / {userID}"}) url request path

@PathVariable ( "userID") int userID, on the method of reading user information parameter 

@RequestParam ( "key") int key parameter in the method of the parameter read request 

 

 

IOC and AOP

IOC

 

AOP Aspect Oriented Programming

@Aspect

@Component

public class LogAspect{

  private static final Logger logger = LoggerFactory.getLogger(LogAspect.class)

 @Before("execution(* com.nowcoder.controller.indexController.*(..))")

public void beforeMethod(){

  logger.info();

}

 @After("execution(* com.nowcoder.controller.indexController.*(..))")

public void beforeMethod(){

  logger.info();

}

}

 

Guess you like

Origin www.cnblogs.com/ytnwu/p/11029013.html
Recommended