-
В SecurityConfig прописываем своего обработчика
@Override protected void configure(HttpSecurity security) throws Exception { security.authorizeRequests() .antMatchers("/register").permitAll() .anyRequest().authenticated()
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| " Use black hole register for common delete/change keys | |
| nnoremap x "_x | |
| nnoremap dd "_dd | |
| nnoremap D "_D | |
| nnoremap d "_d | |
| nnoremap c "_c | |
| nnoremap C "_C | |
| vnoremap d "_d | |
| vnoremap x "_x | |
| vnoremap c "_c |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // styles/typography/typographies/paragraph.ts | |
| export const paragraph = { | |
| p: { | |
| /* B2S | |
| font-family: ${Montserrat}; | |
| font-weight: ${Medium}; | |
| font-size: 15px; | |
| line-height: 24px; | |
| letter-spacing: -0.01em; | |
| */ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head data-build=""> | |
| <meta charset="UTF-8"> | |
| <title>Toolbox Enterprise</title> | |
| <style>*{box-sizing:border-box}:root{--ring-action-link-color:#0080e5;--ring-borders-color:#c5d1db;--ring-button-primary-background-color:#1a98ff;--ring-link-color:#0f5b99;--ring-link-hover-color:#ff008c;--ring-main-color:#008eff;--ring-main-hover-components:#007ee5;--ring-secondary-color:#737577;--ring-tag-background-color:#e6ecf2;--ring-white-text-color:#fff}body,html{margin:0;padding:0;height:100%;font-family:system-ui,Arial,sans-serif;font-size:13px}h1{margin:0}p{margin-top:8px;margin-bottom:8px}header{display:flex;align-items:center;border-bottom:1px solid var(--ring-borders-color);padding:0 32px;height:64px}header>a{font-size:14px;text-decoration:none;color:var(--ring-link-color)}header>a:hover{text-decoration:underline}.centered-block{display:flex;justify-content:center;padding-top:96px}.message{margin-bottom:24px;color:var(--ring-secondary-color)}.content{margin-top:0;margin-bot |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import React from 'react'; | |
| import {useForm} from 'react-hook-form'; | |
| import RegisteredInput from './registered-input'; | |
| type FormValues = { | |
| name: string; | |
| age: number; | |
| }; | |
| function getFormValues(): FormValues { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "actions": [ | |
| { | |
| "name": "publishTuple", | |
| "payload": { | |
| "tuple": [ | |
| 1, | |
| "Hello", | |
| 3.14 | |
| ] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Place your key bindings in this file to override the defaults | |
| [ | |
| { | |
| "key": "ctrl+j", | |
| "command": "cursorDown", | |
| "when": "textInputFocus" | |
| }, | |
| { | |
| "key": "ctrl+k", | |
| "command": "cursorUp", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package pw.coins.room | |
| import pw.coins.user.dtos.User | |
| import javax.persistence.* | |
| import au.com.console.jpaspecificationdsl.and | |
| import au.com.console.jpaspecificationdsl.get | |
| import au.com.console.jpaspecificationdsl.where | |
| import io.kotest.matchers.shouldBe | |
| import io.kotest.matchers.shouldNotBe | |
| import org.junit.jupiter.api.Test |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| package com.pochka15.funfics.configs; | |
| import com.pochka15.funfics.configs.filters.JwtRequestFilter; | |
| import org.springframework.context.annotation.Bean; | |
| import org.springframework.context.annotation.Configuration; | |
| import org.springframework.http.HttpHeaders; | |
| import org.springframework.http.HttpMethod; | |
| import org.springframework.security.config.annotation.web.builders.HttpSecurity; | |
| import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; | |
| import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // It doesn't make inserts | |
| @Transactional | |
| public boolean saveByAddingToTheList(SavePostForm form, String authorName) { | |
| final Optional<User> found = userRepository.findByName(authorName); | |
| if (found.isPresent()) { | |
| User user = found.get(); | |
| Post post = postFormToPostConverter.convert(form); | |
| post.setAuthor(User.builder().id(found.get().getId()).build()); | |
| user.getPosts().add(post); | |
| return true; |
NewerOlder