I am trying to generate a bean that would represent java.nio.file.Path
using a static method Paths.get(String path)
. my current Spring setup looks as follows:
<bean id="myPath" class="java.nio.file.Paths" factory-method="get">
<constructor-arg value="c:\\tmp\\" />
</bean>
but it comes back with an excpetion No matching factory method found: factory method 'get'
. Any ideas why that is the case?
java.nio.file.Paths.get expects URI. Besides, this is xml not java don't use \\
Try as
file:/C:/tmp/
If you have problems with URI syntax visit http://en.wikipedia.org/wiki/File_url
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With