Skip to content

Instantly share code, notes, and snippets.

@ekirastogi
ekirastogi / SecurityFilter.java
Last active June 10, 2018 04:57
How to define Filter order in Filter Chain in Spring Boot
package com.ekiras.filter;
import org.springframework.core.annotation.Order;
import org.springframework.stereotype.Component;
import javax.servlet.*;
import java.io.IOException;
/**
* Created by ekansh on 22/10/15.
@arieljannai
arieljannai / mysql_sequence.sql
Last active October 7, 2024 06:24
creating sequence with nextval, currval, setval in mysql
-- based on http://www.microshell.com/database/mysql/emulating-nextval-function-to-get-sequence-in-mysql/
-- might be needed
-- SET GLOBAL log_bin_trust_function_creators = 1;
CREATE TABLE `sequence_data` (
`sequence_name` varchar(100) NOT NULL,
`sequence_increment` int(11) unsigned NOT NULL DEFAULT 1,
`sequence_min_value` int(11) unsigned NOT NULL DEFAULT 1,
`sequence_max_value` bigint(20) unsigned NOT NULL DEFAULT 18446744073709551615,