Spring Framework FileSystemResourceLoader - top ranked examples from Open Source projects

These code examples were ranked by Codota’s semantic indexing as the best open source examples for Spring Framework FileSystemResourceLoader class.

This code example shows how to use the following methods:
 
		ServiceTestUtil.initPermissions(); 
 
		if (_mainServlet == null) { 
			MockServletContext mockServletContext = 
				new AutoDeployMockServletContext( 
					new FileSystemResourceLoader()); 
 
			ServletContextPool.put(StringPool.BLANK, mockServletContext); 
 
			MockServletConfig mockServletConfig = new MockServletConfig( 
				mockServletContext); 
 
			_mainServlet = new MainServlet(); 
 
			try { 
				_mainServlet.init(mockServletConfig); 
			} 
			catch (ServletException se) { 
				throw new RuntimeException( 
6
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
 
    @Before 
    public void setUp() { 
        resolver = new StringTemplateViewResolver();
        resolver.setServletContext(new MockServletContext());
        resolver.setResourceLoader(new FileSystemResourceLoader());
        resolver.setTemplateRoot("src/test/webapp/templates");
    } 
 
    @Test
    public void shouldResolveTemplateFromFilesystem() { 
        StringTemplateView view = resolver.resolveViewName("form", Locale.getDefault());
        assertThat(view, notNullValue());
    } 
 
    @Test
    public void shouldReturnNullWhenTemplateDoesNotExist() { 
        StringTemplateView view = resolver.resolveViewName("missing", Locale.getDefault());
        assertThat(view, nullValue());
    } 
5
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	private String jobTracker, jobName, jobPriority;
	private Boolean validateEachStatement;
	private String propertiesLocation;
 
	private ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(
			new FileSystemResourceLoader());
 
	 
	public void init() throws Exception {
		pigContextFactory = new PigContextFactoryBean();
		pigContextFactory.setConfiguration(hadoopConfiguration);
 
		if (StringUtils.hasText(jobTracker)) {
			pigContextFactory.setJobTracker(jobTracker);
		} 
 
		if (execType != null) {
			pigContextFactory.setExecType(execType);
		} 
		Properties props = loadProperties();
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	 
	@Override 
	protected void setUp() throws Exception { 
		try { 
			super.setUp(); 
			ServletContext srvCtx = new MockServletContext("", new FileSystemResourceLoader()); 
			ApplicationContext applicationContext = this.getConfigUtils().createApplicationContext(srvCtx); 
			this.setApplicationContext(applicationContext); 
			RequestContext reqCtx = this.createRequestContext(applicationContext, srvCtx); 
			this.setRequestContext(reqCtx); 
			this.setUserOnSession("guest"); 
		} catch (Exception e) { 
			throw e; 
		} 
	} 
	 
	protected RequestContext createRequestContext(ApplicationContext applicationContext, ServletContext srvCtx) { 
    	RequestContext reqCtx = new RequestContext(); 
    	srvCtx.setAttribute(WebApplicationContext.ROOT_WEB_APPLICATION_CONTEXT_ATTRIBUTE, applicationContext); 
    	MockHttpServletRequest request = new MockHttpServletRequest(); 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	private String home = "";
	private String cmd = home + BIN;
	private File wkdir = new File(".");
 
	private ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(
			new FileSystemResourceLoader());
 
	public RCommands() { 
		String os = System.getProperty("os.name").toLowerCase();
 
		// set default R paths - best effort 
		if (os.contains("win")) {
			home = "C:\\Program Files\\R\\";
			File f = new File(home);
			if (f.exists() && f.isDirectory()) {
				File[] listFiles = f.listFiles();
				if (listFiles != null && listFiles.length > 0) {
					home = listFiles[0].getAbsolutePath() + "\\";
				} 
			} 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
        ctx.stop(); 
        System.out.println("Completed in " + (end - start) + "ms"); 
    } 
 
    private static MockServletContext createServletContext() { 
        MockServletContext context = new MockServletContext("src/webapp", new FileSystemResourceLoader()); 
        context.addInitParameter("database.driver.class", "org.hsqldb.jdbcDriver"); 
        context.addInitParameter("database.driver.url", "jdbc:hsqldb:mem:webapp-template"); 
        context.addInitParameter("database.driver.username", "sa"); 
        context.addInitParameter("database.driver.password", ""); 
        context.addInitParameter("hibernate.dialect", "org.hibernate.dialect.HSQLDialect"); 
        context.addInitParameter("hibernate.cache.provider_class", "org.hibernate.cache.NoCacheProvider"); 
        return context; 
    } 
 
    private static XmlWebApplicationContext createRootApplicationContext(MockServletContext servletContext) { 
        XmlWebApplicationContext applicationContext = new XmlWebApplicationContext(); 
        applicationContext.setServletContext(servletContext); 
        applicationContext.refresh(); 
        return applicationContext; 
4
CodeRank
Experience pair programming with AI  Get Codota for Java
This code example shows how to use the following methods:
	private HiveClientFactoryBean hiveClientFactory;
	private HiveTemplate hiveTemplate;
 
 
	private ResourcePatternResolver resourceResolver = new PathMatchingResourcePatternResolver(
			new FileSystemResourceLoader());
 
	 
	public void init() { 
		hiveClientFactory = new HiveClientFactoryBean();
 
		hiveClientFactory.setHost(host);
		hiveClientFactory.setPort(port);
		hiveClientFactory.setTimeout(timeout.intValue());
 
		hiveTemplate = new HiveTemplate(hiveClientFactory.getObject());
	} 
 
	private String info() {
		StringBuilder sb = new StringBuilder();
4
CodeRank
Experience pair programming with AI  Get Codota for Java