@Transactional
	public void onApplicationEvent(ContextRefreshedEvent event) {
		
		if ( installDefaultAdminUser && defaultAdminUsername != null && defaultAdminPassword != null ) {
				
			User admin = userService.findByUsername("admin");
			
			if (admin == null) {
				
				admin = new User();
				admin.setUsername(defaultAdminUsername);
				admin.setPassword(defaultAdminPassword);
			
				Group userGroup = new Group();
				userGroup.setName("ROLE_USER");
				userService.installNewGroup(userGroup);
			
				Group adminGroup = new Group();
				adminGroup.setName("ROLE_ADMIN");
				userService.installNewGroup(adminGroup);
			
				admin.setGroups( new ArrayList<Group>(2));
				admin.getGroups().add(userGroup);
				admin.getGroups().add(adminGroup);
			
				userService.installNewUser(admin);
				log.info("Installed default admin account with username="+defaultAdminUsername);
			}
		}
	}