Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

moocstudent/SpringBoot-learning

Repository files navigation

在bean中有几个实体类
在application.yml对实体类的属性进行了赋值
在test测试类Demo....Tests进行了实体类输出
在bean中使用@ConfigurationProperties @Validated
使用JSR303数据校验
使用JSR303自定义注解
在bean中使用@Value



学习两个注解: @PropertySource , @ImportResource
配置文件的优先级和指定方式
@PropertySource:通过@PropertySource注解将properties配置文件中的值存储到Spring的 Environment中,Environment接口提供方法去读取配置文件中的值,参数是properties文件中定义的key值。
官方更推荐@ConfigurationProperties(prefix = "person")这样的配置加载
TODO 平板视频

About

No description or website provided.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

AltStyle によって変換されたページ (->オリジナル) /