- @Autowired
- ApplicationProperties properties;
-
-
- @Bean
- public String bootstrapServers() { return properties.bootstrapServers; }
-
- @Bean
- public String topic() {
- return properties.topic;
- }
-
- @Bean
- public String consumerGroup() {
- return properties.consumerGroup;
- }
-
- @Bean
- public WebMvcConfigurer corsConfigurer() {
- return new WebMvcConfigurer() {
- @Override
- public void addCorsMappings(CorsRegistry registry) {
- registry
- .addMapping("/**")
- .allowedOrigins("http://localhost:4200");
- }
- };
- }