Skip to content

Instantly share code, notes, and snippets.

View apalyukha's full-sized avatar
🇺🇦

Andrii Paliukha apalyukha

🇺🇦
View GitHub Profile
@apalyukha
apalyukha / application.properties
Created January 7, 2019 13:07
Spring Boot REST: add oAuth2 authorization 2
spring.session.jdbc.initialize-schema=always
spring.session.jdbc.table-name=SPRING_SESSION
spring.session.jdbc.schema=classpath:session_tables.sql
@apalyukha
apalyukha / session_tables.sql
Created January 7, 2019 13:06
Spring Boot REST: add oAuth2 authorization sessions table 2
CREATE TABLE spring_session (
primary_id CHAR(36) NOT NULL
CONSTRAINT spring_session_pk
PRIMARY KEY,
session_id CHAR(36) NOT NULL,
creation_time BIGINT NOT NULL,
last_access_time BIGINT NOT NULL,
max_inactive_interval INTEGER NOT NULL,
expiry_time BIGINT NOT NULL,
principal_name VARCHAR(300) -- <= here was 100
@apalyukha
apalyukha / pom.xml
Created January 7, 2019 13:04
Spring boot MVC: integration tests - dependencies
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<version>RELEASE</version>
<scope>test</scope>
@apalyukha
apalyukha / webpack.config.js
Created January 7, 2019 13:02
Spring Boot REST: add webpack
const path = require('path');
const VueLoaderPlugin = require('vue-loader/lib/plugin');
module.exports = {
mode: 'development',
devtool: 'source-map',
entry: path.join(__dirname, 'src', 'main', 'resources', 'static', 'js', 'main.js'),
devServer: {
contentBase: './dist',
compress: true,
@apalyukha
apalyukha / package.json
Created January 7, 2019 13:01
Spring Boot REST: add webpack
{
"name": "sarafan",
"version": "1.0.0",
"description": "",
"main": "webpack.config.js",
"dependencies": {
"vue": "^2.5.17",
"vue-resource": "^1.5.1"
},
"devDependencies": {