Docker compose almost working

This commit is contained in:
Laurent
2024-10-23 23:01:11 +02:00
parent a66035d1f5
commit e6a6bf274b
57 changed files with 906 additions and 169 deletions

View File

@@ -50,7 +50,6 @@ public class Security {
config.setAllowedOrigins(Arrays.asList(conf.authorizedHosts));
config.setAllowedMethods(Arrays.asList(conf.authorizedMethods));
config.setAllowedHeaders(Arrays.asList(conf.authorizedHeaders));
config.setAllowCredentials(true);
UrlBasedCorsConfigurationSource source = new UrlBasedCorsConfigurationSource();
source.registerCorsConfiguration("/**", config);

View File

@@ -12,7 +12,7 @@ public interface ScoreRepo
extends JpaRepository<ScoreEntity, String> {
@Query(
value = "SELECT * FROM Score s HAVING 10;",
value = "SELECT * FROM score s HAVING 10;",
nativeQuery = true)
List<ScoreEntity> findLeaderboard();

View File

@@ -1,15 +1,18 @@
#=============MAIN=============
spring.application.name=unluckiest
#=============SERVER=============
server.port=5000
#=============SECURITY=============
sec.cors.authorizedHots=http://localhost:5173
sec.cors.authorizedHots=*
sec.cors.authorizedMethods=GET,POST,PUT,DELETE,OPTION
sec.cors.authorizedHeader=Authorization,Content-type
#=============DATABASE=============
spring.datasource.url=jdbc:mysql://127.0.0.1:3306/unluckiest_db
spring.datasource.username=root
spring.datasource.password=
spring.datasource.url=jdbc:${DB_URL}
spring.datasource.username=${DB_USER}
spring.datasource.password=${DB_PASSWORD}
spring.jpa.database-platform=org.hibernate.dialect.MariaDBDialect
spring.jpa.show-sql=true

View File

@@ -6,8 +6,4 @@ import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class UnluckiestApplicationTests {
@Test
void contextLoads() {
}
}