fix: demo
This commit is contained in:
@@ -42,6 +42,32 @@
|
||||
<groupId>org.nl</groupId>
|
||||
<artifactId>nl-business-map</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- test -->
|
||||
<dependency>
|
||||
<groupId>junit</groupId>
|
||||
<artifactId>junit</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- test -->
|
||||
<dependency>
|
||||
<groupId>org.springframework.boot</groupId>
|
||||
<artifactId>spring-boot-starter-test</artifactId>
|
||||
<scope>test</scope>
|
||||
</dependency>
|
||||
|
||||
<!-- dynamic-datasource -->
|
||||
<dependency>
|
||||
<groupId>com.baomidou</groupId>
|
||||
<artifactId>dynamic-datasource-spring-boot3-starter</artifactId>
|
||||
</dependency>
|
||||
|
||||
<!-- mysql -->
|
||||
<dependency>
|
||||
<groupId>com.mysql</groupId>
|
||||
<artifactId>mysql-connector-j</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
|
||||
|
||||
74
nl-web-app/src/main/java/org/nl/Application.java
Normal file
74
nl-web-app/src/main/java/org/nl/Application.java
Normal file
@@ -0,0 +1,74 @@
|
||||
/*
|
||||
* Copyright [2022] [https://www.xiaonuo.vip]
|
||||
*
|
||||
* Snowy采用APACHE LICENSE 2.0开源协议,您在使用过程中,需要注意以下几点:
|
||||
*
|
||||
* 1.请不要删除和修改根目录下的LICENSE文件。
|
||||
* 2.请不要删除和修改Snowy源码头部的版权声明。
|
||||
* 3.本项目代码可免费商业使用,商业使用请保留源码和相关描述文件的项目出处,作者声明等。
|
||||
* 4.分发源码时候,请注明软件出处 https://www.xiaonuo.vip
|
||||
* 5.不可二次分发开源参与同类竞品,如有想法可联系团队xiaonuobase@qq.com商议合作。
|
||||
* 6.若您的项目无法满足以上几点,需要更多功能代码,获取Snowy商业授权许可,请在官网购买授权,地址为 https://www.xiaonuo.vip
|
||||
*/
|
||||
package org.nl;
|
||||
|
||||
import lombok.SneakyThrows;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.boot.Banner;
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.context.ConfigurableApplicationContext;
|
||||
import org.springframework.core.env.Environment;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
/**
|
||||
* SpringBoot方式启动类
|
||||
*
|
||||
* @author xuyuxiang
|
||||
* @date 2021/12/18 16:57
|
||||
*/
|
||||
@Slf4j
|
||||
@RestController
|
||||
@SpringBootApplication
|
||||
public class Application {
|
||||
|
||||
/* 解决druid 日志报错:discard long time none received connection:xxx */
|
||||
static {
|
||||
System.setProperty("druid.mysql.usePingMethod","false");
|
||||
}
|
||||
|
||||
/**
|
||||
* 主启动函数
|
||||
*
|
||||
* @author xuyuxiang
|
||||
* @date 2022/7/30 21:42
|
||||
*/
|
||||
@SneakyThrows
|
||||
public static void main(String[] args) {
|
||||
SpringApplication springApplication = new SpringApplication(Application.class);
|
||||
springApplication.setBannerMode(Banner.Mode.OFF);
|
||||
ConfigurableApplicationContext configurableApplicationContext = springApplication.run(args);
|
||||
Environment env = configurableApplicationContext.getEnvironment();
|
||||
log.info("""
|
||||
|
||||
----------------------------------------------------------
|
||||
Application is running! Access URLs:
|
||||
Local: http://localhost:{}
|
||||
Doc: http://localhost:{}/doc.html
|
||||
----------------------------------------------------------""",
|
||||
env.getProperty("server.port"),
|
||||
env.getProperty("server.port"));
|
||||
}
|
||||
|
||||
/**
|
||||
* 首页
|
||||
*
|
||||
* @author xuyuxiang
|
||||
* @date 2022/7/8 14:22
|
||||
**/
|
||||
@GetMapping("/")
|
||||
public String index() {
|
||||
return "WELCOME";
|
||||
}
|
||||
}
|
||||
@@ -1,11 +0,0 @@
|
||||
package org.nl;
|
||||
|
||||
/**
|
||||
* @Author: lyd
|
||||
* @Date: ${DATE}
|
||||
*/
|
||||
public class Main {
|
||||
public static void main(String[] args) {
|
||||
System.out.println("Hello world!");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user