Open feesx opened 5 years ago
@Configuration public class RxJava2JdbcConfig { /**
public Flux getAllAdverts3() { String sql = "SELECT name,code FROM company"; return Flux.from(db.select(sql).autoMap(Company.class)); }
@Query("select name, code from company") public interface Company { @Column("name") String name();
@Column("code") String code();
}
result :
[ {} ] but mysql have data
Did you check for an error emission from the Flux?
Instead of using spring have you tried to connect to the database directly using rxjava2-jdbc?
@Configuration public class RxJava2JdbcConfig { /**
public Flux getAllAdverts3() {
String sql = "SELECT name,code FROM company";
return Flux.from(db.select(sql).autoMap(Company.class));
}
@Query("select name, code from company") public interface Company { @Column("name") String name();
}
result :
[ {} ] but mysql have data