Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

嵌入式值解析EmbeddedValueResolverAware中resolve() #2

Open
Thw841277862 opened this issue Oct 14, 2023 · 1 comment
Open

嵌入式值解析EmbeddedValueResolverAware中resolve() #2

Thw841277862 opened this issue Oct 14, 2023 · 1 comment
Labels
question Further information is requested

Comments

@Thw841277862
Copy link

看了博主的EmbeddedValueResolverAware文章个人有几点疑问:
1.resolve()方法是如何具体的去读取解析配置文件的参数?
2.如果配置文件存在多环境区分它又是如何去处理的比如:dev\test\pro三个不同的环境多有user.name,这个变量。resolve()方法具体如果抉择?
3.

@xuchengsheng
Copy link
Owner

resolveStringValue()方法主要是${...} 或 #{...} 语法来请求配置参数或执行 SpEL 表达式时,Spring 使用相应的解析器来解释这些值。

关于多环境配置请看:https://github.com/xuchengsheng/spring-reading/tree/master/spring-annotation/spring-annotation-profile

@xuchengsheng xuchengsheng added the question Further information is requested label Nov 17, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants