Skip to content

Instantly share code, notes, and snippets.

View bh5k's full-sized avatar

Bryan Hansen bh5k

  • stgconsulting.com
View GitHub Profile
@bh5k
bh5k / gist:9204328d22993e8293237f79330849d7
Created August 3, 2023 03:37
Spring Beans Namespace
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.springframework.org/schema/beans
https://www.springframework.org/schema/beans/spring-beans.xsd">
</beans>
@bh5k
bh5k / Command line for maven
Created May 14, 2022 17:29
Maven Archetype for JDBC Project Setup
mvn archetype:generate -DarchetypeArtifactId=maven-archetype-simple -DarchetypeGroupId=org.apache.maven.archetypes -DinteractiveMode=false -DgroupId=com.pluralsight -DartifactId=library-app -Dpackage=com.pluralsight
@bh5k
bh5k / pom.xml
Created April 19, 2017 21:59
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/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.pluralsight</groupId>
<artifactId>HelloWorld</artifactId>
<version>1.0.0-SNAPSHOT</version>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
package com.pluralsight.model;
import org.hibernate.validator.constraints.Range;
public class Goal {
@Range(min = 1, max = 120)
private int minutes;
package com.pluralsight.proxy;
import java.util.List;
import twitter4j.Query;
import twitter4j.QueryResult;
import twitter4j.Status;
import twitter4j.Twitter;
import twitter4j.TwitterException;
import twitter4j.TwitterFactory;
<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.pluralsight</groupId>
<artifactId>FitnessTracker1</artifactId>
<packaging>war</packaging>
<version>0.0.1-SNAPSHOT</version>
<name>FitnessTracker1 Maven Webapp</name>
<url>http://maven.apache.org</url>
@bh5k
bh5k / gist:db6c7522776c4556d713
Created June 17, 2015 18:03
servlet-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
xmlns:mvc="http://www.springframework.org/schema/mvc"
xmlns:p="http://www.springframework.org/schema/p"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security.xsd
@bh5k
bh5k / gist:605f5c2fd833ade58b55
Created June 17, 2015 18:02
security-config.xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Change the following configuration for security shortcut
1) <beans to <beans:beans
2) <bean xmlns to <beans:beans xmlns:beans
3) xmlns:security to xmlns
-->
<beans:beans xmlns:beans="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:context="http://www.springframework.org/schema/context"
@bh5k
bh5k / gist:fd70abcac1637d41af36
Created June 17, 2015 18:00
Login Controller
package com.pluralsight.controller;
import org.springframework.stereotype.Controller;
import org.springframework.ui.ModelMap;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
@Controller
public class LoginController {
// For 403 - Authentication error