Skip to content

Commit

Permalink
Указал, что бины инфраструктурные.
Browse files Browse the repository at this point in the history
stringInterner инжектится внутрь DiagnosticBeanPostProcessor, поэтому во избежание ругани он должен быть инфраструктурным бином
  • Loading branch information
nixel2007 committed Dec 26, 2023
1 parent b7df65b commit 1e5ca45
Showing 1 changed file with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,19 +22,23 @@
package com.github._1c_syntax.bsl.languageserver.infrastructure;

import com.github._1c_syntax.utils.StringInterner;
import org.springframework.beans.factory.config.BeanDefinition;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.Role;

/**
* Конфигурация бинов из 1c-syntax/utils.
*/
@Configuration
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public class UtilsConfiguration {

/**
* @return Настроенный объект интернирователя строк.
*/
@Bean
@Role(BeanDefinition.ROLE_INFRASTRUCTURE)
public StringInterner stringInterner() {
return new StringInterner();
}
Expand Down

0 comments on commit 1e5ca45

Please sign in to comment.