Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.36 KB | None | 0 0
  1. ## Set array value via expression-driven dependency injection - `@Value`
  2. ```java
  3. import org.springframework.beans.factory.annotation.Value;
  4. ...
  5. @Value("${client.contextPaths:com.myapp.defaultmodel}")
  6. protected String[] contextPaths;
  7. ```
  8.  
  9. Comma separated values in .yml file
  10. *application.yml*
  11. ```yaml
  12. client:
  13. contextPaths: com.myapp.model, com.myapp.model2
  14.  
  15. ```
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement