Grim
Grim

Reputation: 1996

STS+Roo basics: Custom Method

i generate a Roo-project from Database and try to get some Experiences in using roo.

id like to send an eMail when i just save a new "user", so i go into the

UserController_roo_Controller.aj 

and modify the aspect's create-method. Unfortually roo overwrite this roo-controller sometimes.

i guess this is the wrong class iv edited. so where do i place that functionallity?

Upvotes: 0

Views: 96

Answers (1)

GrahamA
GrahamA

Reputation: 5923

Are you editing the aj file or the java file? Roo will replace methods in an AspectJ (aj) file but not the java file.

If this is the case move the create method into from the aj class to the java class and Roo will stop auotmaticlly generating the method

Upvotes: 1

Related Questions