...
 
Commits (3)
    https://gitcode.net/li819059787/1024opensource/-/commit/e834968b167f24d5a3c54039a616c9fb4d82d4c1 Initial commit 2022-11-13T22:52:47+08:00 Cortlee 819059787@qq.com https://gitcode.net/li819059787/1024opensource/-/commit/3821a70a363af948a405021eed4d235131f763f9 Initial commit 2022-11-13T22:54:06+08:00 Cortlee 819059787@qq.com https://gitcode.net/li819059787/1024opensource/-/commit/4ec09157ea31a34b07a7d4450a94aa0086a67bbd Initial commit 2022-11-13T22:56:02+08:00 Cortlee 819059787@qq.com
<?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">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.4.2</version>
<relativePath/>
</parent>
<groupId>com.gitcode</groupId>
<artifactId>opensource</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>1024opensource</name>
<description>1024opensource</description>
<properties>
<java.version>1.8</java.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>
</project>
# preview.yml
autoOpen: true # 打开工作空间时是否自动开启所有应用的预览
apps:
- port: 8080 # 应用的端口
run: java -jar ./target/opensource-0.0.1-SNAPSHOT.jar # 应用的启动命令
command: # 使用此命令启动服务,且不执行run
root: ./ # 应用的启动目录
name: hello-1024 # 应用名称
description: hello-1024 # 应用描述
autoOpen: true # 打开工作空间时是否自动开启预览(优先级高于根级 autoOpen)
package com.gitcode.opensource;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
/**
* spring启动
*/
@SpringBootApplication
public class Application {
public static void main(String[] args) {
SpringApplication.run(Application.class);
}
}
\ No newline at end of file
package com.gitcode.opensource.controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
@RestController
@RequestMapping
public class HelloWorld {
/**
* hello
* @return
*/
@GetMapping
public String helloWorld(){
return "hello 1024!!!";
}
}
server.port=8080
\ No newline at end of file