From aa60e5535ed9c96e6db0e0d8a507e6fb89385a8a Mon Sep 17 00:00:00 2001 From: phatcanlez Date: Fri, 6 Dec 2024 10:56:31 +0700 Subject: [PATCH 1/2] add lastest --- SWP391 | 1 - 1 file changed, 1 deletion(-) delete mode 160000 SWP391 diff --git a/SWP391 b/SWP391 deleted file mode 160000 index 6587195..0000000 --- a/SWP391 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 6587195c3105ae130ad1f9c7d9a5b7fad92f98b2 From d1d01db3d9ecd4c1c571ac4c0611770c46016e35 Mon Sep 17 00:00:00 2001 From: phatcanlez Date: Wed, 11 Dec 2024 16:14:59 +0700 Subject: [PATCH 2/2] test --- src/config/axios.js | 12 ++++++------ src/main/resources/application.properties | 4 ++-- 2 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/config/axios.js b/src/config/axios.js index 74e89ae..6b2911f 100644 --- a/src/config/axios.js +++ b/src/config/axios.js @@ -1,19 +1,19 @@ import axios from "axios"; const api = axios.create({ - baseURL: 'http://103.90.227.65:8080/api/' + baseURL: "http://localhost:8080/api/", }); //lam hanh dong truoc khi call api const handleBefore = (config) => { - const token = localStorage.getItem("token")?.replaceAll('"', ""); - config.headers["Authorization"] = `Bearer ${token}`; - return config; + const token = localStorage.getItem("token")?.replaceAll('"', ""); + config.headers["Authorization"] = `Bearer ${token}`; + return config; }; const handleError = (error) => { - console.log(error); + console.log(error); }; api.interceptors.request.use(handleBefore, handleError); -export default api; \ No newline at end of file +export default api; diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 5427b59..21a3447 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -1,7 +1,7 @@ spring.application.name=SWP391 -spring.datasource.url=jdbc:mysql://103.90.227.65/koikichi +spring.datasource.url=jdbc:mysql://localhost:3306/koikichi spring.datasource.username=root -spring.datasource.password=SWP@123456 +spring.datasource.password=root spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQL8Dialect