can I add new class on Hotswap Agent? I try changing name methods, body of methods, fields, and works fine, but when I add new class and call it on another the app crash, don do the content of that class and not show errors.
package test;
public class TestNewClass
{
public void test()
{
System.out.println("test new class");
}
}
@Controller
public class MenuController extends MainController
{
@RequestMapping(value = "/menu/getMenu", method = RequestMethod.GET, produces = APPLICATION_JSON_VALUE_UTF_8)
@ResponseBody
public String getMenu(HttpServletResponse httpRessponse)
{
System.out.println("test 3 "+test);
UserVitrina user = getUserVitrina();
MenuHandler menuHandler = new MenuHandler();
try
{
genericBO.openSessionTransaction();
Map menu = menuHandler.getMenu(user.getIdUsuario());
genericBO.commitTransaction();
return new Gson().toJson(menu);
}
catch (Exception ex)
{
new Log().printLogError("MENU. Error obtener menu.", ex, (user == null ? "usuario nulo" : user.getUsername()), null, Resources.LogName.DEBUG);
httpRessponse.setStatus(HttpStatus.BAD_GATEWAY.value());
genericBO.abortTransaction();
return new Gson().toJson(new MessageServer().generateMessageError(ex));
}
finally
{
genericBO.closeSession();
}
}
}