Skip to content

Commit

Permalink
Merge pull request #133 from Nohit-Java17/main
Browse files Browse the repository at this point in the history
sync dev
  • Loading branch information
Tynab committed Jun 28, 2023
2 parents 2ccd566 + ec5dc0c commit e5dbcaf
Show file tree
Hide file tree
Showing 5 changed files with 85 additions and 5 deletions.
13 changes: 13 additions & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# These are supported funding model platforms

github: # Replace with up to 4 GitHub Sponsors-enabled usernames e.g., [user1, user2]
patreon: yamiannephilim
open_collective: # Replace with a single Open Collective username
ko_fi: # Replace with a single Ko-fi username
tidelift: # Replace with a single Tidelift platform-name/package-name e.g., npm/babel
community_bridge: # Replace with a single Community Bridge project-name e.g., cloud-foundry
liberapay: # Replace with a single Liberapay username
issuehunt: # Replace with a single IssueHunt username
otechie: # Replace with a single Otechie username
lfx_crowdfunding: # Replace with a single LFX Crowdfunding project-name e.g., cloud-foundry
custom: paypal.me/yamiannephilim
35 changes: 35 additions & 0 deletions .github/workflows/maven.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# This workflow will build a Java project with Maven, and cache/restore any dependencies to improve the workflow execution time
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.

name: Java CI with Maven

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: '11'
distribution: 'temurin'
cache: maven
- name: Build with Maven
run: mvn -B package --file pom.xml

# Optional: Uploads the full dependency graph to GitHub to improve the quality of Dependabot alerts this repository can receive
- name: Update dependency graph
uses: advanced-security/maven-dependency-submission-action@571e99aab1055c2e71a1e2309b9691de18d6b7d6
34 changes: 33 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
Expand Down Expand Up @@ -79,6 +81,36 @@
<artifactId>java-jwt</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>org.yaml</groupId>
<artifactId>snakeyaml</artifactId>
<version>2.0</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
<version>5.3.27</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.13.4.2</version>
</dependency>
<dependency>
<groupId>net.minidev</groupId>
<artifactId>json-smart</artifactId>
<version>2.4.9</version>
</dependency>
<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-core</artifactId>
<version>5.7.8</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.7.12</version>
</dependency>
</dependencies>
<build>
<plugins>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ protected void configure(HttpSecurity http) throws Exception {
.permitAll()
.antMatchers(CART_VIEW + FREE_VIEW, CHECKOUT_VIEW + FREE_VIEW, HISTORY_VIEW + FREE_VIEW,
ORDER_VIEW + FREE_VIEW, PROFILE_VIEW + FREE_VIEW)
.hasRole(CLIENT).anyRequest().authenticated().and().formLogin().loginPage(LOGIN_VIEW)
.hasRole(CLIENT).anyRequest().permitAll().and().formLogin().loginPage(LOGIN_VIEW)
.loginProcessingUrl(LOGIN_VIEW).defaultSuccessUrl(INDEX_VIEW).failureUrl(LOGIN_VIEW + "?error=true")
.permitAll().and().logout().invalidateHttpSession(true).clearAuthentication(true).permitAll().and()
.exceptionHandling().accessDeniedPage(LOGIN_VIEW).and().rememberMe()
Expand Down
6 changes: 3 additions & 3 deletions src/main/resources/templates/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
<meta name="description" content="Capstone Project">
<meta name="author" content="Nohit">
<meta name="viewport" content="width=device-width, initial-scale=1">
<title th:text="${#strings.capitalize(title)+' | nohitElectronics'}">
Title | nohitElectronics
<title>
Trang Chủ | nohitElectronics
</title>
<!-- Google Fonts -->
<link href="https://fonts.googleapis.com/css?family=Titillium+Web:400,200,300,700,600" rel="stylesheet">
Expand Down Expand Up @@ -406,4 +406,4 @@ <h2>
</script>
</body>

</html>
</html>

0 comments on commit e5dbcaf

Please sign in to comment.