Search code examples
spring-bootvaadin7

how to base url and access application.properties whsn using Vaadin Spring boot 1.0.0


Developing application using Vaadin Spring 1.0.0 and trying to find out

1.how to excess application.propertie file content from vaadin UI.

2.Also how to get Base URL when using vaadin 7.6

Any inputs would be appreciated.

TY.


Solution

  • You can access properties like this with Spring, using annotation:

    @Value("${ssh.usernme}")
    String USER;
    

    To get base url you can get the URL and then remove context-path:

    ((VaadinServletRequest) vaadinRequest).getRequestURL()