This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(form 2.1+) | |
<div data-th-attr="data-percent=${level90s}"></div> | |
-- OR -- | |
<div th:attr="data-percent=${level90s}"></div> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
@ImportResource("classpath:/com/acme/properties-config.xml") | |
public class AppConfig { | |
private @Value("${jdbc.url}") String url; | |
private @Value("${jdbc.username}") String username; | |
private @Value("${jdbc.password}") String password; | |
public @Bean DataSource dataSource() { | |
return new DriverManagerDataSource(url, username, password); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Foo { | |
public void init() { | |
// initialization logic | |
} | |
} | |
public class Bar { | |
public void cleanup() { | |
// destruction logic | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Configuration | |
public class AppConfig { | |
@Bean | |
public MyService myService() { | |
return new MyServiceImpl(); | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Configuration | |
@ComponentScan("com.company") // search the com.company package for @Component classes | |
@ImportXml("classpath:com/company/data-access-config.xml") // XML with DataSource bean | |
public class Config { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Target({ElementType.FIELD, ElementType.PARAMETER}) | |
@Retention(RetentionPolicy.RUNTIME) | |
@Qualifier | |
public @interface Offline { | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class AbstractMockedTest { | |
@Before | |
public void initMockitoAnnotations() { | |
MockitoAnnotations.initMocks(this); | |
} | |
protected void assertEmpty(Collection collection) { | |
Assert.assertTrue("Collection was expected to be empty", collection.isEmpty()); | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package be.ipc.storm.common.tags; | |
import javax.servlet.jsp.JspException; | |
import javax.servlet.jsp.JspWriter; | |
import javax.servlet.jsp.tagext.TagSupport; | |
import java.io.IOException; | |
import java.util.Properties; | |
/** | |
* Created by Davy van Roy. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE HTML> | |
<html lang="en-US"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta HTTP-EQUIV="REFRESH" content="0; url=${pageContext.request.contextPath}/j_spring_security_logout"> | |
<title></title> | |
</head> | |
<body> | |
</body> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?xml version="1.0" encoding="UTF-8"?> | |
<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | |
xmlns="http://java.sun.com/xml/ns/javaee" | |
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_3_0.xsd" | |
version="3.0"> | |
<!-- Map all errors to Spring MVC handler method. See CustomErrorController.generalError() --> | |
web-app> | |
<display-name>Archetype Created Web Application</display-name> | |
</web-app> |