web config :)
This commit is contained in:
parent
38b0f46f7f
commit
acd85c93e0
16
src/main/java/com/guams/review/configuration/WebConfig.java
Normal file
16
src/main/java/com/guams/review/configuration/WebConfig.java
Normal file
@ -0,0 +1,16 @@
|
||||
package com.guams.review.configuration;
|
||||
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.servlet.config.annotation.CorsRegistry;
|
||||
import org.springframework.web.servlet.config.annotation.EnableWebMvc;
|
||||
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;
|
||||
|
||||
@Configuration
|
||||
@EnableWebMvc
|
||||
public class WebConfig implements WebMvcConfigurer {
|
||||
|
||||
@Override
|
||||
public void addCorsMappings(CorsRegistry registry) {
|
||||
registry.addMapping("/**"); // autorise toutes les requêtes externe
|
||||
}
|
||||
}
|
@ -1,10 +1,7 @@
|
||||
drop extension if exists pgcrypto;
|
||||
drop table if exists publication;
|
||||
drop table if exists post;
|
||||
drop table if exists author;
|
||||
|
||||
create extension if not exists pgcrypto;
|
||||
|
||||
create table author
|
||||
(
|
||||
id uuid default gen_random_uuid() primary key,
|
||||
@ -31,6 +28,3 @@ create table publication
|
||||
foreign key (author_fk) references author (id),
|
||||
foreign key (post_fk) references post (id)
|
||||
);
|
||||
|
||||
-- insert into author (name, password, profile_picture)
|
||||
-- values ('John Doe', crypt('your_password', gen_salt('bf')), null);
|
||||
|
Loading…
Reference in New Issue
Block a user