commit
This commit is contained in:
@@ -24,8 +24,7 @@ subprojects {
|
|||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'org.springframework.boot:spring-boot-starter'
|
compileOnly 'org.projectlombok:lombok'
|
||||||
compileOnly 'org.projectlombok:lombok'
|
|
||||||
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
developmentOnly 'org.springframework.boot:spring-boot-devtools'
|
||||||
annotationProcessor 'org.projectlombok:lombok'
|
annotationProcessor 'org.projectlombok:lombok'
|
||||||
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
testImplementation 'org.springframework.boot:spring-boot-starter-test'
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
implementation 'org.springframework.boot:spring-boot-starter'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
6
service/member/build.gradle
Normal file
6
service/member/build.gradle
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
|
||||||
|
|
||||||
|
dependencies {
|
||||||
|
implementation 'org.springframework.boot:spring-boot-starter-web'
|
||||||
|
}
|
||||||
|
|
||||||
@@ -0,0 +1,13 @@
|
|||||||
|
package bit.space;
|
||||||
|
|
||||||
|
import org.springframework.boot.SpringApplication;
|
||||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||||
|
|
||||||
|
@SpringBootApplication
|
||||||
|
public class MemberApplication {
|
||||||
|
|
||||||
|
public static void main(String[] args) {
|
||||||
|
SpringApplication.run(MemberApplication.class, args);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -0,0 +1,14 @@
|
|||||||
|
package bit.space.controller;
|
||||||
|
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
public class MemberController {
|
||||||
|
|
||||||
|
@GetMapping("/api/welcome")
|
||||||
|
public String welcome() {
|
||||||
|
return "Welcome To Spring Boot React test";
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
2
service/member/src/main/resources/application.yml
Normal file
2
service/member/src/main/resources/application.yml
Normal file
@@ -0,0 +1,2 @@
|
|||||||
|
server:
|
||||||
|
port: 9999
|
||||||
@@ -16,13 +16,11 @@ rootProject.name = 'bit-space'
|
|||||||
def gradleFile = new File(subDir.absolutePath, "build.gradle")
|
def gradleFile = new File(subDir.absolutePath, "build.gradle")
|
||||||
if(!gradleFile.exists()){
|
if(!gradleFile.exists()){
|
||||||
gradleFile.text =
|
gradleFile.text =
|
||||||
"""
|
"""
|
||||||
|
dependencies {
|
||||||
|
|
||||||
dependencies {
|
}
|
||||||
|
""".stripIndent(20)
|
||||||
}
|
|
||||||
|
|
||||||
""".stripIndent(20)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|||||||
6
web/front-react/jsconfig.json
Normal file
6
web/front-react/jsconfig.json
Normal file
@@ -0,0 +1,6 @@
|
|||||||
|
{
|
||||||
|
"compilerOptions": {
|
||||||
|
"baseUrl": "./src",
|
||||||
|
"target": "ES6"
|
||||||
|
}
|
||||||
|
}
|
||||||
@@ -12,7 +12,7 @@
|
|||||||
"web-vitals": "^2.1.4"
|
"web-vitals": "^2.1.4"
|
||||||
},
|
},
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"start": "react-scripts start",
|
"start": "cross-env NODE_PATH=src react-scripts start",
|
||||||
"build": "react-scripts build",
|
"build": "react-scripts build",
|
||||||
"test": "react-scripts test",
|
"test": "react-scripts test",
|
||||||
"eject": "react-scripts eject"
|
"eject": "react-scripts eject"
|
||||||
|
|||||||
@@ -1,13 +1,25 @@
|
|||||||
import logo from './logo.svg';
|
import { useEffect, useState } from 'react';
|
||||||
import './App.css';
|
import './App.css';
|
||||||
|
import logo from './logo.svg';
|
||||||
|
|
||||||
function App() {
|
function App() {
|
||||||
|
|
||||||
|
const [message, setMessage] = useState("");
|
||||||
|
|
||||||
|
useEffect(() => {
|
||||||
|
fetch('/api/welcome')
|
||||||
|
.then(response => response.text())
|
||||||
|
.then(message => {
|
||||||
|
setMessage(message);
|
||||||
|
});
|
||||||
|
},[])
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className="App">
|
<div className="App">
|
||||||
<header className="App-header">
|
<header className="App-header">
|
||||||
<img src={logo} className="App-logo" alt="logo" />
|
<img src={logo} className="App-logo" alt="logo" />
|
||||||
<p>
|
<p>
|
||||||
Edit <code>src/App.js</code> and save to reload.
|
{message}
|
||||||
</p>
|
</p>
|
||||||
<a
|
<a
|
||||||
className="App-link"
|
className="App-link"
|
||||||
|
|||||||
Reference in New Issue
Block a user