Git Product home page Git Product logo

demo-reactive-mybatis's Introduction

Hi there 👋

demo-reactive-mybatis's People

Contributors

kazuki43zoo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

demo-reactive-mybatis's Issues

I can't get query data

2018-05-14 00:22:15,300-Predicate "((POST && /login) && Accept: [application/json])" matches against "POST /login"
2018-05-14 00:22:15,579-User info User(username=111, password=111, scope=user, client_id=SU_DI, client_secret=hz_su_di, user_uuid=)
2018-05-14 00:22:15,597-==>  Preparing: select * from WxUser where user_name=? 
2018-05-14 00:22:15,611-==> Parameters: 111(String)
2018-05-14 00:22:15,625-<==      Total: 1
2018-05-14 00:22:15,630-Predicate "org.springframework.web.reactive.function.server.RequestPredicates$$Lambda$632/565824767@d9c4fdc" matches against "POST /login"
2018-05-14 00:22:15,641-Failed to handle request [POST http://127.0.0.1:8080/login]
java.lang.NullPointerException: value
@Override
    public Mono<ServerResponse> userLogin(ServerRequest request) {
        return request
                .bodyToMono(User.class)
                .flatMap(user -> ok()
                        .body(BodyInserters
                                .fromObject(loginService.test(user))));
    }
    @Override
    public Mono<WxUser> test(User user) {
        log.info("User info {}", user);
        return Flux.just(userMapper.login(user.getUsername())).singleOrEmpty().subscribeOn(Schedulers.elastic());
    }
@Mapper
public interface WxUserMapper {
    /**
     *
     * @param username
     * @return
     */
    WxUser login(@Param(value = "username") String username);
}
@Data
@NoArgsConstructor
@AllArgsConstructor
public class WxUser implements Serializable {
    public Integer userID;
    public String username;
    public String password;

    public WxUser(String username, String password) {
        this.username = username;
        this.password = password;
    }
}

this is my code, Could you help me solve this problem,

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.