use of org.thymeleaf.extras.springsecurity4.dialect.SpringSecurityDialect in project thymeleaf-tests by thymeleaf.
the class SpringSecurityTest method testSpringSecurity.
@Test
public void testSpringSecurity() throws Exception {
final SpringSecurityWebProcessingContextBuilder processingContextBuilder = new SpringSecurityWebProcessingContextBuilder();
processingContextBuilder.setApplicationContextConfigLocation("classpath:templateengine/springsecurity/applicationContext-security.xml");
final TestExecutor executor = TestExecutorFactory.createTestExecutor();
executor.setProcessingContextBuilder(processingContextBuilder);
executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance(), new SpringSecurityDialect() }));
executor.execute("classpath:templateengine/springsecurity");
Assert.assertTrue(executor.isAllOK());
}
use of org.thymeleaf.extras.springsecurity4.dialect.SpringSecurityDialect in project irida by phac-nml.
the class IridaUIWebConfig method additionalDialects.
/**
* This is to add additional Thymeleaf dialects.
*
* @return A Set of Thymeleaf dialects.
*/
private Set<IDialect> additionalDialects() {
Set<IDialect> dialects = new HashSet<>();
dialects.add(new SpringSecurityDialect());
dialects.add(new LayoutDialect());
dialects.add(new DataAttributeDialect());
return dialects;
}
use of org.thymeleaf.extras.springsecurity4.dialect.SpringSecurityDialect in project thymeleaf-tests by thymeleaf.
the class DataPrefixSpringSecurityTest method testSpringSecurity.
@Test
public void testSpringSecurity() throws Exception {
final SpringSecurityWebProcessingContextBuilder processingContextBuilder = new SpringSecurityWebProcessingContextBuilder();
processingContextBuilder.setApplicationContextConfigLocation("classpath:templateengine/dataprefix/springsecurity/applicationContext-security.xml");
final TestExecutor executor = TestExecutorFactory.createTestExecutor();
executor.setProcessingContextBuilder(processingContextBuilder);
executor.setDialects(Arrays.asList(new IDialect[] { SpringSpecificVersionUtils.createSpringStandardDialectInstance(), new SpringSecurityDialect() }));
executor.execute("classpath:templateengine/dataprefix/springsecurity");
Assert.assertTrue(executor.isAllOK());
}
Aggregations