Skip to content

Instantly share code, notes, and snippets.

Avatar

Mick Knutson mickknutson

View GitHub Profile
View c.p.s.web.configuration.WebAppInitializer.getServletConfigClasses()
public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
...
@Override
protected Class<?>[] getServletConfigClasses() {
return new Class[] { WebMvcConfig.class };
}
...
@Override
public void onStartup(final ServletContext servletContext) throws ServletException {
View c.p.s.web.configuration.WebAppInitializer
public class WebAppInitializer extends AbstractAnnotationConfigDispatcherServletInitializer {
@Override
protected Class<?>[] getRootConfigClasses() {
return new Class[] { JavaConfig.class,
DataSourceConfig.class,
SecurityConfig.class
};
}
...
@mickknutson
mickknutson / pom.xml
Created Nov 12, 2012 — forked from gordonad/pom.xml
Spring Best Practices Maven Pom
View pom.xml
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.gordondickens.sample</groupId>
<artifactId>sample-parent</artifactId>
<version>1.0.0</version>
<packaging>pom</packaging>
View file1.sh
C:\>gradle -t -a
--- buildscript ---
versions: [root:1.0.0]
list1: [com.baselogic:common:1.0.0]
list2: [com.baselogic:extended:1.0.0]
--- allprojects ---
versions: [root:1.0.0]
list1: [com.baselogic:common:1.0.0]
list2: [com.baselogic:extended:1.0.0]
--- allprojects ---
View file1.sh
C:\>gradle -t -a
--- buildscript ---
versions: [root:1.0.0]
list1: [com.baselogic:common:1.0.0]
list2: [com.baselogic:extended:1.0.0]
--- allprojects ---
versions: [root:1.0.0]
list1: [com.baselogic:common:1.0.0]
list2: [com.baselogic:extended:1.0.0]
--- allprojects ---
View file1.groovy
buildscript {
versions = [root: "1.0.0"]
list1 = ["com.baselogic:common:${versions.root}"]
list2 = ["com.baselogic:extended:${versions.root}"]
println "--- buildscript ---"
println "versions: $versions"
println "list1: $list1"
println "list2: $list2"
View file1.groovy
buildscript {
def versions = [root: "1.0.0"]
List list1 = ["com.baselogic:common:${versions.root}"]
List list2 = ["com.baselogic:extended:${versions.root}"]
println "--- buildscript ---"
println "versions: $versions"
println "list1: $list1"
println "list2: $list2"
View file1.groovy
def versions = [root: "1.0.0"]
buildscript {
List list1 = ["com.baselogic:common:${versions.root}"]
List list2 = ["com.baselogic:extended:${versions.root}"]
println "--- buildscript ---"
println "versions: $versions"
println "list1: $list1"
@mickknutson
mickknutson / file1.groovy
Created Feb 12, 2012
new gradle repositories
View file1.groovy
repositories {
mavenLocal()
mavenCentral()
maven {url 'https://maven.java.net/content/groups/public/'}
maven {url 'http://maven.glassfish.org/content/repositories/eclipselink'}
maven {url 'http://nexus.openqa.org/content/repositories/releases/'}
maven {url 'http://scala-tools.org/repo-releases'}
maven {url 'http://repository.jboss.org/nexus/content/groups/public-jboss/'}
@mickknutson
mickknutson / file1.sh
Created Feb 12, 2012
gradle repositories error
View file1.sh
08:42:13.083 [DEBUG] [org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter] Finished executing task ':ch01:compileJava'
08:42:13.094 [ERROR] [org.gradle.BuildExceptionReporter]
08:42:13.099 [ERROR] [org.gradle.BuildExceptionReporter] FAILURE: Build failed with an exception.
08:42:13.104 [ERROR] [org.gradle.BuildExceptionReporter]
08:42:13.108 [ERROR] [org.gradle.BuildExceptionReporter] * What went wrong:
08:42:13.112 [ERROR] [org.gradle.BuildExceptionReporter] Could not resolve all dependencies for configuration ':ch01:compile'.
08:42:13.118 [ERROR] [org.gradle.BuildExceptionReporter] Cause: You must specify a URL for a Maven repository.