-
Jul 28th, 2011, 09:21 AM
#1
Using @Value to inject primitive value from property file into servlet possible?
Hi,
Is it possible to use @Value annotation to inject primitive value from property file into servlet? The servlet is not manager by Spring but I use SpringBeanAutowiringSupport.processInjectionBasedO nServletContext(this, config.getServletContext()); to handle autowiring support.
I created a simple webapp to demonstrate what works and what does not for me:
https://github.com/lukas-vlcek/Sprin...AnnotationTest
More specifically, the follwoing servlet does not work for me:
https://github.com/lukas-vlcek/Sprin...nject/Bar.java
However, the following servlet does work:
https://github.com/lukas-vlcek/Sprin...nject/Foo.java
Which means that the property file is processed by Spring and it should be accessible. But I am getting exception when trying to access and inject the value using @Value("#{ values['one'] }").
Any ideas?
Regards,
Lukas
-
Dec 15th, 2011, 07:23 AM
#2
Sorry sir I do not know I am so sorry
Thank you
Tags for this Thread
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules