Skip to content

Instantly share code, notes, and snippets.

View gigenthomas's full-sized avatar
🎯
Focusing

Gigen Thomas gigenthomas

🎯
Focusing
View GitHub Profile
spring.datasource.url=jdbc:postgresql://localhost/myDatabase
spring.datasource.username=user
spring.datasource.password=password
spring.datasource.driverClassName=org.postgresql.Driver
spring.jpa.hibernate.hbm2ddl.auto=update
spring.jpa.hibernate.ejb.naming_strategy=org.hibernate.cfg.EJB3NamingStrategy
spring.jpa.hibernate.show_sql=true
spring.jpa.hibernate.format_sql=true
spring.jpa.hibernate.use_sql_comments=false
#logging.level.org.springframework.web: DEBUG
logging.level.org.springframework.security=DEBUG
spring.datasource.url=jdbc:h2:mem:AZ;INIT=CREATE SCHEMA IF NOT EXISTS AZ;RUNSCRIPT FROM 'src/main/resources/create.sql';DB_CLOSE_ON_EXIT=FALSE
spring.datasource.driverClassName=org.h2.Driver
spring.datasource.username=sa
spring.datasource.password=
spring.jpa.database-platform=org.hibernate.dialect.H2Dialect
spring.jpa.hibernate.ddl-auto=create-drop
@EnableWebMvcSecurity
@Configuration
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired
private DataSource dataSource;
@Override
protected void configure(HttpSecurity http) throws Exception {
@SpringBootApplication
public class Application extends SpringBootServletInitializer {
@Override
protected SpringApplicationBuilder configure(SpringApplicationBuilder application) {
return application.sources(Application.class);
}
public static void main(String[] args) throws Exception {
SpringApplication.run(Application.class, args);
@gigenthomas
gigenthomas / schema.sql
Created October 10, 2015 18:10 — forked from fernandomantoan/schema.sql
Schema for PostgreSQL to use with JdbcTokenStore (Spring Security OAuth2)
create table oauth_client_details (
client_id VARCHAR(256) PRIMARY KEY,
resource_ids VARCHAR(256),
client_secret VARCHAR(256),
scope VARCHAR(256),
authorized_grant_types VARCHAR(256),
web_server_redirect_uri VARCHAR(256),
authorities VARCHAR(256),
access_token_validity INTEGER,
refresh_token_validity INTEGER,
@gigenthomas
gigenthomas / app.js
Last active August 29, 2015 13:57 — forked from ggoodman/app.js
var app = angular.module('plunker', ['ngGrid']);
app.controller('MainCtrl', function($scope) {
$scope.name = 'World';
$scope.fruits = [ 'Apple', 'Orange' ,'Banana'];
$scope.myData = [
{name: "Moroni", age: 50},