2 ways to refer classpath resource in spring boot projects
Table of Contents
2 ways to refer classpath resource in spring boot projects
Using ClasspathResource
[java]
import org.springframework.core.io.ClassPathResource;
@Bean
public XsdSchema mySchema() {
return new SimpleXsdSchema(new ClassPathResource(“myfile.xsd”));
}
[/java]
Note: Here myfile.xsd should be located in src/main/resources.
Using Resource
[java]
import org.springframework.core.io.Resource;
@Value(“classpath:myfile.xsd”)
private Resource res;
@Bean
public XsdSchema mySchema() {
return new SimpleXsdSchema(res);
}
[/java]
[5687]icecasino লগইন ও অ্যাপ ডাউনলোড | বিকাশ অনলাইন ক্যাসিনো গাইড,icecasino লগইন করে সেরা অনলাইন স্লট গেম এবং লাইভ ডিলার ক্যাসিনো উপভোগ করুন। বিকাশ দিয়ে অনলাইন ক্যাসিনো পেমেন্ট করে আজই জয়েন করুন। visit: icecasino