Skip to content

Commit 2bf2e7e

Browse files
fix: added static frontend (#7)
Co-authored-by: stefanodel <[email protected]>
1 parent e7782fe commit 2bf2e7e

18 files changed

+115
-25
lines changed

src/main/java/it/gov/pagopa/message/core/configuration/SecurityConfig.java

-24
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
package it.gov.pagopa.message.core.controller;
2+
3+
import org.springframework.stereotype.Controller;
4+
import org.springframework.web.bind.annotation.GetMapping;
5+
6+
@Controller
7+
public class ReactController {
8+
@GetMapping("/{path:[^\\.]*}")
9+
public String redirect() {
10+
return "forward:/index.html";
11+
}
12+
}

src/main/java/it/gov/pagopa/message/core/stub/controller/StubMessageCoreControllerImpl.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,15 @@
33
import it.gov.pagopa.message.core.dto.MessageDTO;
44
import it.gov.pagopa.message.core.stub.model.Message;
55
import it.gov.pagopa.message.core.stub.service.StubMessageCoreServiceImpl;
6-
import org.springframework.http.HttpStatus;
76
import org.springframework.http.ResponseEntity;
7+
import org.springframework.web.bind.annotation.CrossOrigin;
88
import org.springframework.web.bind.annotation.RestController;
99

1010
import java.util.ArrayList;
1111

12+
1213
@RestController
14+
@CrossOrigin(origins = "*")
1315
public class StubMessageCoreControllerImpl implements StubMessageCoreController {
1416

1517
private final StubMessageCoreServiceImpl stubMessageCoreService;

src/main/resources/application.yml

+7
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,13 @@ spring:
33
name: "@project.artifactId@"
44
version: "@project.version@"
55
jmx.enabled: true
6+
resources:
7+
static-locations: classpath:/static/
8+
cache:
9+
cachecontrol:
10+
max-age: 3600
11+
no-transform: true
12+
must-revalidate: true
613
config:
714
activate:
815
on-profile: default
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
{
2+
"files": {
3+
"main.css": "/static/css/main.7607bf2b.css",
4+
"main.js": "/static/js/main.8cb2e57e.js",
5+
"static/js/453.d070fbd4.chunk.js": "/static/js/453.d070fbd4.chunk.js",
6+
"index.html": "/index.html",
7+
"main.7607bf2b.css.map": "/static/css/main.7607bf2b.css.map",
8+
"main.8cb2e57e.js.map": "/static/js/main.8cb2e57e.js.map",
9+
"453.d070fbd4.chunk.js.map": "/static/js/453.d070fbd4.chunk.js.map"
10+
},
11+
"entrypoints": [
12+
"static/css/main.7607bf2b.css",
13+
"static/js/main.8cb2e57e.js"
14+
]
15+
}

src/main/resources/static/favicon.ico

3.78 KB
Binary file not shown.

src/main/resources/static/index.html

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
<!doctype html><html lang="en"><head><meta charset="utf-8"/><link rel="icon" href="/favicon.ico"/><meta name="viewport" content="width=device-width,initial-scale=1"/><meta name="theme-color" content="#000000"/><meta name="description" content="Web site created using create-react-app"/><link rel="apple-touch-icon" href="/logo192.png"/><link rel="manifest" href="/emdmessagecore/manifest.json"/><title>React App</title><script defer="defer" src="/emdmessagecore/static/js/main.8cb2e57e.js"></script><link href="/emdmessagecore/static/css/main.7607bf2b.css" rel="stylesheet"></head><body><noscript>You need to enable JavaScript to run this app.</noscript><div id="root"></div></body></html>

src/main/resources/static/logo192.png

5.22 KB
Loading

src/main/resources/static/logo512.png

9.44 KB
Loading
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
{
2+
"short_name": "React App",
3+
"name": "Create React App Sample",
4+
"icons": [
5+
{
6+
"src": "favicon.ico",
7+
"sizes": "64x64 32x32 24x24 16x16",
8+
"type": "image/x-icon"
9+
},
10+
{
11+
"src": "logo192.png",
12+
"type": "image/png",
13+
"sizes": "192x192"
14+
},
15+
{
16+
"src": "logo512.png",
17+
"type": "image/png",
18+
"sizes": "512x512"
19+
}
20+
],
21+
"start_url": ".",
22+
"display": "standalone",
23+
"theme_color": "#000000",
24+
"background_color": "#ffffff"
25+
}

src/main/resources/static/robots.txt

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# https://www.robotstxt.org/robotstxt.html
2+
User-agent: *
3+
Disallow:

src/main/resources/static/static/css/main.7607bf2b.css

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/static/static/css/main.7607bf2b.css.map

+1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main/resources/static/static/js/453.d070fbd4.chunk.js

+2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)