[go: nahoru, domu]

Skip to content

Commit

Permalink
Add Component to R2DBC repositories
Browse files Browse the repository at this point in the history
  • Loading branch information
Matt Raible committed Feb 6, 2022
1 parent e859b13 commit c0e284d
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
import java.util.Collection;
import java.util.Optional;
import javax.annotation.PostConstruct;

import com.mycompany.myapp.repository.UserRepository;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
Expand All @@ -15,10 +17,14 @@
import org.springframework.boot.autoconfigure.liquibase.LiquibaseProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.core.env.Environment;
import org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientManager;
import org.springframework.security.oauth2.client.ReactiveOAuth2AuthorizedClientProviderBuilder;
import org.springframework.security.oauth2.client.endpoint.AbstractWebClientReactiveOAuth2AccessTokenResponseClient;
import org.springframework.security.oauth2.client.web.DefaultReactiveOAuth2AuthorizedClientManager;
import tech.jhipster.config.DefaultProfileUtil;
import tech.jhipster.config.JHipsterConstants;

@org.springframework.nativex.hint.TypeHint(types = { org.HdrHistogram.Histogram.class, org.HdrHistogram.ConcurrentHistogram.class })
@org.springframework.nativex.hint.TypeHint(types = { org.HdrHistogram.Histogram.class, org.HdrHistogram.ConcurrentHistogram.class, org.springframework.data.r2dbc.repository.support.SimpleR2dbcRepository.class })
@SpringBootApplication
@EnableConfigurationProperties({ LiquibaseProperties.class, ApplicationProperties.class })
public class PostgresApp {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -27,13 +27,15 @@
import org.springframework.data.relational.repository.support.MappingRelationalEntityInformation;
import org.springframework.r2dbc.core.DatabaseClient;
import org.springframework.r2dbc.core.RowsFetchSpec;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
* Spring Data SQL reactive custom repository implementation for the Blog entity.
*/
@SuppressWarnings("unused")
@Component
class BlogRepositoryInternalImpl extends SimpleR2dbcRepository<Blog, Long> implements BlogRepositoryInternal {

private final DatabaseClient db;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,13 +30,15 @@
import org.springframework.data.relational.repository.support.MappingRelationalEntityInformation;
import org.springframework.r2dbc.core.DatabaseClient;
import org.springframework.r2dbc.core.RowsFetchSpec;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
* Spring Data SQL reactive custom repository implementation for the Post entity.
*/
@SuppressWarnings("unused")
@Component
class PostRepositoryInternalImpl extends SimpleR2dbcRepository<Post, Long> implements PostRepositoryInternal {

private final DatabaseClient db;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,13 +26,15 @@
import org.springframework.data.relational.repository.support.MappingRelationalEntityInformation;
import org.springframework.r2dbc.core.DatabaseClient;
import org.springframework.r2dbc.core.RowsFetchSpec;
import org.springframework.stereotype.Component;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;

/**
* Spring Data SQL reactive custom repository implementation for the Tag entity.
*/
@SuppressWarnings("unused")
@Component
class TagRepositoryInternalImpl extends SimpleR2dbcRepository<Tag, Long> implements TagRepositoryInternal {

private final DatabaseClient db;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
import org.springframework.data.relational.core.sql.Expression;
import org.springframework.data.relational.core.sql.Table;
import org.springframework.r2dbc.core.DatabaseClient;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;
import reactor.core.publisher.Flux;
import reactor.core.publisher.Mono;
Expand Down Expand Up @@ -57,6 +58,7 @@ interface UserRepositoryInternal {
Flux<User> findAllWithAuthorities(Pageable pageable);
}

@Component
class UserRepositoryInternalImpl implements UserRepositoryInternal {

private final DatabaseClient db;
Expand Down

0 comments on commit c0e284d

Please sign in to comment.