Docker compose almost working
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -6,8 +6,4 @@ import org.springframework.boot.test.context.SpringBootTest;
|
||||
@SpringBootTest
|
||||
class UnluckiestApplicationTests {
|
||||
|
||||
@Test
|
||||
void contextLoads() {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user