Search in sources :

Example 1 with UserRoleService

use of com.khartec.waltz.service.user.UserRoleService in project waltz by khartec.

the class UserHarness method main.

public static void main(String[] args) {
    AnnotationConfigApplicationContext ctx = new AnnotationConfigApplicationContext(DIConfiguration.class);
    UserRoleService userRoleService = ctx.getBean(UserRoleService.class);
    DSLContext dsl = ctx.getBean(DSLContext.class);
    int rc = dsl.insertInto(USER).set(USER.USER_NAME, "kamran").set(USER.PASSWORD, "1234").onDuplicateKeyIgnore().execute();
    System.out.println(rc);
// 
// ImmutableLoginRequest loginRequest = ImmutableLoginRequest.builder()
// .userName("dwatkins")
// .password("wrong")
// .build();
// 
// boolean authenticated = userService.authenticate(loginRequest);
// System.out.println(authenticated);
// 
// userRoleService.findAllUsers().forEach(System.out::println);
}
Also used : UserRoleService(com.khartec.waltz.service.user.UserRoleService) AnnotationConfigApplicationContext(org.springframework.context.annotation.AnnotationConfigApplicationContext) DSLContext(org.jooq.DSLContext)

Aggregations

UserRoleService (com.khartec.waltz.service.user.UserRoleService)1 DSLContext (org.jooq.DSLContext)1 AnnotationConfigApplicationContext (org.springframework.context.annotation.AnnotationConfigApplicationContext)1