Skip to content

xuweicheng/spring-boot-aspects-prototype

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

spring-boot-aspects-prototype

Run Projects

  1. Install Java 8
  2. Install Postgres 9.5
  3. Create a database called spring-boot-aspects-prototype
  4. Change HibernateConfig.java db-user and db-password to your postgres user and password.

After Spring bootRun

  1. Create Team Juventus FC. HTTP Post http://localhost:8080/Team/Juventus FC

  2. Create Team Juventus FC again, will throw BusinessRuleException. This rule CanNotCreateTeamWithDuplicateName.java is an aspect weaved to factory, a spring managed bean.

  3. Change Team name to FIFA. HTTP Post http://localhost:8080/Team/1/FIFA This will throw another BusinessRuleException. This rule TeamNameCanNotBeFIFA.java is an aspect weaved to Domain Entity, managed by Hibernate.

IntelliJ VM options -ea -javaagent:aspectjweaver-1.8.10.jar -javaagent:spring-instrument-4.3.6.RELEASE.jar

About

spring-boot-aspects-prototype

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages