Changeset 800779d
- Timestamp:
- 08/07/22 18:55:02 (2 years ago)
- Branches:
- main
- Children:
- 6eba109
- Parents:
- 3e98cea
- Files:
-
- 3 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
reactapp/package-lock.json
r3e98cea r800779d 16 16 "@testing-library/react": "^13.3.0", 17 17 "@testing-library/user-event": "^13.5.0", 18 "axios": "^0.27.2", 18 19 "babel": "^6.23.0", 19 20 "babel-plugin-macros": "^3.1.0", 21 "js-cookie": "^3.0.1", 20 22 "jsog": "^1.0.7", 21 23 "react": "^18.2.0", … … 4872 4874 } 4873 4875 }, 4876 "node_modules/axios": { 4877 "version": "0.27.2", 4878 "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", 4879 "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", 4880 "dependencies": { 4881 "follow-redirects": "^1.14.9", 4882 "form-data": "^4.0.0" 4883 } 4884 }, 4885 "node_modules/axios/node_modules/form-data": { 4886 "version": "4.0.0", 4887 "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 4888 "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 4889 "dependencies": { 4890 "asynckit": "^0.4.0", 4891 "combined-stream": "^1.0.8", 4892 "mime-types": "^2.1.12" 4893 }, 4894 "engines": { 4895 "node": ">= 6" 4896 } 4897 }, 4874 4898 "node_modules/axobject-query": { 4875 4899 "version": "2.2.0", … … 11307 11331 "funding": { 11308 11332 "url": "https://github.com/chalk/supports-color?sponsor=1" 11333 } 11334 }, 11335 "node_modules/js-cookie": { 11336 "version": "3.0.1", 11337 "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz", 11338 "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==", 11339 "engines": { 11340 "node": ">=12" 11309 11341 } 11310 11342 }, … … 20360 20392 "integrity": "sha512-32+ub6kkdhhWick/UjvEwRchgoetXqTK14INLqbGm5U2TzBkBNF3nQtLYm8ovxSkQWArjEQvftCKryjZaATu3w==" 20361 20393 }, 20394 "axios": { 20395 "version": "0.27.2", 20396 "resolved": "https://registry.npmjs.org/axios/-/axios-0.27.2.tgz", 20397 "integrity": "sha512-t+yRIyySRTp/wua5xEr+z1q60QmLq8ABsS5O9Me1AsE5dfKqgnCFzwiCZZ/cGNd1lq4/7akDWMxdhVlucjmnOQ==", 20398 "requires": { 20399 "follow-redirects": "^1.14.9", 20400 "form-data": "^4.0.0" 20401 }, 20402 "dependencies": { 20403 "form-data": { 20404 "version": "4.0.0", 20405 "resolved": "https://registry.npmjs.org/form-data/-/form-data-4.0.0.tgz", 20406 "integrity": "sha512-ETEklSGi5t0QMZuiXoA/Q6vcnxcLQP5vdugSpuAyi6SVGi2clPPp+xgEhuMaHC+zGgn31Kd235W35f7Hykkaww==", 20407 "requires": { 20408 "asynckit": "^0.4.0", 20409 "combined-stream": "^1.0.8", 20410 "mime-types": "^2.1.12" 20411 } 20412 } 20413 } 20414 }, 20362 20415 "axobject-query": { 20363 20416 "version": "2.2.0", … … 25033 25086 } 25034 25087 } 25088 }, 25089 "js-cookie": { 25090 "version": "3.0.1", 25091 "resolved": "https://registry.npmjs.org/js-cookie/-/js-cookie-3.0.1.tgz", 25092 "integrity": "sha512-+0rgsUXZu4ncpPxRL+lNEptWMOWl9etvPHc/koSRp6MPwpRYAhmk0dUG00J4bxVV3r9uUzfo24wW0knS07SKSw==" 25035 25093 }, 25036 25094 "js-tokens": { -
reactapp/package.json
r3e98cea r800779d 11 11 "@testing-library/react": "^13.3.0", 12 12 "@testing-library/user-event": "^13.5.0", 13 "axios": "^0.27.2", 13 14 "babel": "^6.23.0", 14 15 "babel-plugin-macros": "^3.1.0", 16 "js-cookie": "^3.0.1", 15 17 "jsog": "^1.0.7", 16 18 "react": "^18.2.0", -
reactapp/src/App.js
r3e98cea r800779d 1 import { Outlet } from "react-router-dom"; 2 import { MainWrapper, MainTitle } from "./Components/Styled/Main.style"; 3 import Search from "./Components/Search.js"; 1 import Professor from "./Pages/Professor"; 2 import SearchResults from "./Pages/SearchResults"; 3 import Login from "./Pages/Login"; 4 import { BrowserRouter, Routes, Route } from "react-router-dom"; 5 import Home from "./Pages/Home"; 4 6 5 7 export default function App() { 6 //document.body.style = "background: red;";7 8 return ( 8 <MainWrapper> 9 <style> 10 @import 11 url('https://fonts.googleapis.com/css2?family=Roboto+Mono:ital,wght@0,400;0,500;0,700;1,400;1,500;1,700&display=swap'); 12 </style> 13 <style> 14 { 15 "body { background-color: papayawhip;} * {margin: 0; padding: 0; box-sizing: border-box;}" 16 } 17 </style> 18 <a href="/"> 19 <MainTitle>profesori.mk</MainTitle> 20 </a>{" "} 21 <Search /> 22 <Outlet /> 23 </MainWrapper> 9 <BrowserRouter> 10 <Routes> 11 <Route path="/" element={<Home />}> 12 <Route path="login" element={<Login />}></Route> 13 <Route path="professor"> 14 <Route path=":professorId" element={<Professor />} /> 15 </Route> 16 <Route path="search" element={<SearchResults />}></Route> 17 </Route> 18 </Routes> 19 </BrowserRouter> 24 20 ); 25 21 } -
reactapp/src/index.js
r3e98cea r800779d 1 1 import ReactDOM from "react-dom/client"; 2 import { BrowserRouter, Routes, Route } from "react-router-dom";3 2 import App from "./App"; 4 import Professor from "./Pages/Professor";5 import SearchResults from "./Pages/SearchResults";6 3 7 4 const root = ReactDOM.createRoot(document.getElementById("root")); 8 root.render( 9 <BrowserRouter> 10 <Routes> 11 <Route path="/" element={<App />}> 12 <Route path="professor"> 13 <Route path=":professorId" element={<Professor />} /> 14 </Route> 15 <Route path="search" element={<SearchResults />}></Route> 16 </Route> 17 </Routes> 18 </BrowserRouter> 19 ); 5 root.render(<App />); -
springapp/src/main/java/mk/profesori/springapp/Security/SecurityConfiguration.java
r3e98cea r800779d 10 10 import org.springframework.security.crypto.password.PasswordEncoder; 11 11 import org.springframework.security.web.SecurityFilterChain; 12 import org.springframework.web.servlet.config.annotation.CorsRegistry; 13 import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; 12 14 13 15 import lombok.RequiredArgsConstructor; … … 30 32 31 33 @Bean 34 public WebMvcConfigurer corsConfigurer() { 35 return new WebMvcConfigurer() { 36 @Override 37 public void addCorsMappings(CorsRegistry registry) { 38 registry.addMapping("/**").allowedOrigins("http://192.168.0.17:3000", "http://192.168.0.24:3000"); 39 } 40 }; 41 } 42 43 @Bean 32 44 protected SecurityFilterChain filterChain(HttpSecurity http) throws Exception { 33 45 http
Note:
See TracChangeset
for help on using the changeset viewer.