Server/src/main/java/cn/edu/nju/sicp/configs/BeansConfig.java
@Bean
    public RepositoryRestConfigurer repositoryRestConfigurer() {
        return new RepositoryRestConfigurer() {

            @Override
            public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config, CorsRegistry cors) {
                config.setBasePath("/repositories");
                config.setRepositoryDetectionStrategy(RepositoryDetectionStrategy.RepositoryDetectionStrategies.ANNOTATED);
            }

        };
    }
// Do not expose a repository's REST API unless annotated with (exported = true).
Do not expose a repository's REST API unless annotated with (exported = true).
Do not expose a repository ' s REST API unless annotated with ( exported = true ) .
@Bean
    public RepositoryRestConfigurer repositoryRestConfigurer() {
        return new RepositoryRestConfigurer() {
            @Override
            public void configureRepositoryRestConfiguration(RepositoryRestConfiguration config, CorsRegistry cors) {
                config.setBasePath("/repositories");
                config.setRepositoryDetectionStrategy(RepositoryDetectionStrategy.RepositoryDetectionStrategies.ANNOTATED);
            }
        };
    }
@ Bean public RepositoryRestConfigurer repositoryRestConfigurer ( ) { return new RepositoryRestConfigurer ( ) { @ Override public void configureRepositoryRestConfiguration ( RepositoryRestConfiguration config , CorsRegistry cors ) { config . setBasePath ( "/repositories" ) ; config . setRepositoryDetectionStrategy ( RepositoryDetectionStrategy . RepositoryDetectionStrategies . ANNOTATED ) ; } } ; }
Do not expose a repository's REST API unless annotated with (exported = true).
Do not expose a repository ' s REST API unless annotated with ( exported = true ) .