Skip to content

Commit

Permalink
Added favicon, fixed the sonar qube error, upgraded spring boot
Browse files Browse the repository at this point in the history
  • Loading branch information
surajcm committed Feb 25, 2024
1 parent 8613c05 commit 6315d9f
Show file tree
Hide file tree
Showing 27 changed files with 26 additions and 14 deletions.
3 changes: 1 addition & 2 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ buildscript {
plugins {
id 'java'
id 'idea'
id 'org.springframework.boot' version '3.2.2'
id 'org.springframework.boot' version '3.2.3'
id 'io.spring.dependency-management' version '1.1.4'
id 'net.ltgt.errorprone' version '3.1.0'
id 'com.github.spotbugs' version '6.0.7' apply false
Expand All @@ -43,5 +43,4 @@ test {
test.dependsOn checkstyleMain
test.dependsOn checkstyleTest
bootRun.dependsOn checkstyleMain

check.dependsOn(cpdCheck, pmdMain)
3 changes: 0 additions & 3 deletions config/checkstyle/suppressions.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,7 @@
<?xml version="1.0"?>

<!DOCTYPE suppressions PUBLIC
"-//Checkstyle//DTD SuppressionFilter Configuration 1.2//EN"
"https://checkstyle.org/dtds/suppressions_1_2.dtd">

<!--
NOTES:
Refer to Checkstyle Filters page given below to learn more about suppression filter.
Expand All @@ -18,6 +16,5 @@ WHAT AND WHY CHECKS SUPPRESSED
<suppressions>
<suppress files="ChallengeService.java" checks="MethodLength"/>
<suppress files="SecurityConfig.java" checks="MethodLength"/>
<suppress files="SecurityConfig.java" checks="IllegalCatch"/>
<suppress files="RegistrationController.java" checks="MethodLength"/>
</suppressions>
1 change: 1 addition & 0 deletions gradle.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
systemProp.sonar.gradle.skipCompile=true
2 changes: 1 addition & 1 deletion settings.gradle
Original file line number Diff line number Diff line change
@@ -1 +1 @@
rootProject.name = 'darkhold'
rootProject.name = 'darkhold'
7 changes: 1 addition & 6 deletions src/main/java/com/quiz/darkhold/init/SecurityConfig.java
Original file line number Diff line number Diff line change
Expand Up @@ -45,12 +45,7 @@ public SecurityFilterChain filterChain(final HttpSecurity http,
}
http.authorizeHttpRequests(auth -> auth.anyRequest().authenticated());
http.formLogin((formLogin) -> {
try {
formLogin.defaultSuccessUrl("/", true).permitAll();
} catch (Exception ex) {
//todo : clean up
throw new RuntimeException(ex);
}
formLogin.defaultSuccessUrl("/", true).permitAll();
});
http.logout((logout) -> logout.logoutSuccessUrl("/")
.invalidateHttpSession(true)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ public String registration(final Model model,
@ModelAttribute("user") final User user,
final BindingResult bindingResult) {
logger.info("Inside the registration post method");
//userValidator.validate(userForm, bindingResult);
if (bindingResult.hasErrors()) {
logger.info(String.valueOf(bindingResult.getAllErrors().get(0)));
return "login";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@
@Repository
public interface UserRepository extends JpaRepository<User, Long> {
User findByEmail(String email);

Long countById(Long id);
}


Binary file added src/main/resources/static/images/favicon.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
<meta name="_csrf" content="${_csrf.token}"/>
<meta name="_csrf_header" content="${_csrf.headerName}"/>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/create-challenge-styles.css" rel="stylesheet" />
<script type="text/javascript" src="/scripts/create-challenge-scripts.js"></script>
</head>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/challenge/preview.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Getting Started: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/preview-styles.css" rel="stylesheet" />
<script type="text/javascript" src="/scripts/preview-scripts.js"></script>
</head>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/challenge/publish.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Getting Started: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/publish-styles.css" rel="stylesheet" />
<script type="text/javascript" src="/scripts/core/sockjs.min.js"></script>
<script type="text/javascript" src="/scripts/core/stomp.min.js"></script>
Expand Down
3 changes: 2 additions & 1 deletion src/main/resources/templates/challenge/viewchallenges.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="/scripts/view-challenges-scripts.js"></script>
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="stylesheet" href="styles/challenge-styles.css" />
<link rel="shortcut icon" href="/images/favicon.png">
<link rel="stylesheet" href="/styles/challenge-styles.css" />
<link rel="stylesheet" href="https://fonts.googleapis.com/icon?family=Material+Icons" >
<script type="text/javascript" src="/scripts/common-scripts.js"></script>
</head>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/error.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<title>Error occurred: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/error-styles.css" rel="stylesheet" />
<script type="text/javascript" src="/scripts/common-scripts.js"></script>
<script type="text/javascript" src="/scripts/core/bootstrap-5.3.1/bootstrap.min.js"></script>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/finalscore.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Getting Started: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/darkhold-styles.css" rel="stylesheet" />
<script type="text/javascript" src="/scripts/common-scripts.js"></script>
</head>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/game.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link rel="stylesheet" href="/styles/game-styles.css" />
<link rel="stylesheet" href="/styles/core/flipclock.css" />
<link rel="stylesheet" href="/styles/game-flipclock-custom.css" />
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/game/gameManagement.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Getting Started: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/error-styles.css" rel="stylesheet" />
<script type="text/javascript" src="/scripts/common-scripts.js"></script>
</head>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/game/gamewait.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Getting Started: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/join-styles.css" rel="stylesheet" />
<script type="text/javascript" src="/scripts/core/sockjs.min.js"></script>
<script type="text/javascript" src="/scripts/core/stomp.min.js"></script>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<title>Getting Started: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/homepage.css" rel="stylesheet" />
<script type="text/javascript" src="/scripts/home-scripts.js"></script>
</head>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/interstitial.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="/styles/interstitial-styles.css" rel="stylesheet" />
<link rel="shortcut icon" href="/images/favicon.png">
<script type="text/javascript">
function loading() {
setTimeout(function(){ askQuestion(); }, 5000);
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="/styles/login.css" rel="stylesheet" />
<link rel="shortcut icon" href="/images/favicon.png">
</head>
<body>
<main>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/myprofile.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link href="/styles/error-styles.css" rel="stylesheet" />
<link rel="shortcut icon" href="/images/favicon.png">
<script type="text/javascript" src="/scripts/common-scripts.js"></script>
</head>
<body>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/options/options.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Home: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link rel="stylesheet" href="/styles/option-styles.css" />
<script type="text/javascript" src="/scripts/options-scripts.js"></script>
</head>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/question.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Getting Started: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/question-styles.css" rel="stylesheet" />
<link href="/styles/animate.min.css" rel="stylesheet" />
<script type="text/javascript" src="/scripts/core/sockjs.min.js"></script>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/registration.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
<title>Registration: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/login.css" rel="stylesheet" />
</head>
<body>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/scoreboard.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<title>Getting Started: Darkhold classroom quiz experience</title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/homepage.css" rel="stylesheet" />
<script type="text/javascript" src="/scripts/core/sockjs.min.js"></script>
<script type="text/javascript" src="/scripts/core/stomp.min.js"></script>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/user/user_form.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
<meta name="description" content="darkhold create user page" />
<meta name="author" content="Suraj" />
<title>Getting Started: Darkhold classroom quiz experience</title>
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/error-styles.css" rel="stylesheet" />
<link href="/styles/core/fontawesome-6.2.1/css/all.min.css" rel="stylesheet">
<script type="text/javascript" src="/scripts/common-scripts.js"></script>
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/templates/user/usermanagement.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<title>Getting Started: Darkhold classroom quiz experience</title>
<link rel="shortcut icon" href="/images/favicon.png">
<link href="/styles/error-styles.css" rel="stylesheet" />
<link href="/styles/core/fontawesome-6.2.1/css/all.min.css" rel="stylesheet">
<link href="/styles/icon-styles.css" rel="stylesheet">
Expand Down

0 comments on commit 6315d9f

Please sign in to comment.