灿能云模块提交

This commit is contained in:
2023-10-30 16:45:56 +08:00
parent 42ea0a8136
commit 943a7caa70
12 changed files with 412 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package com.njcn.main;
import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.openfeign.EnableFeignClients;
@Slf4j
@MapperScan("com.njcn.**.mapper")
@EnableFeignClients(basePackages = "com.njcn")
@SpringBootApplication(scanBasePackages = "com.njcn")
public class MainBootApplication {
public static void main(String[] args) {
SpringApplication.run(MainBootApplication.class, args);
}
}

View File

@@ -0,0 +1,48 @@
#?????????
microservice:
ename: @artifactId@
name: '@name@'
version: @version@
sentinel:
url: @sentinel.url@
gateway:
url: @gateway.url@
server:
port: 10225
max-http-header-size: 1048576
#feign????????????
feign:
sentinel:
enabled: true
spring:
application:
name: @artifactId@
#nacos?????????????
cloud:
nacos:
discovery:
ip: @service.server.url@
server-addr: @nacos.url@
namespace: @nacos.namespace@
config:
server-addr: @nacos.url@
namespace: @nacos.namespace@
file-extension: yaml
shared-configs:
- data-id: share-config.yaml
refresh: true
- data-Id: share-config-datasource-db.yaml
refresh: true
main:
allow-bean-definition-overriding: true
#???????
logging:
config: http://@nacos.url@/nacos/v1/cs/configs?tenant=@nacos.namespace@&group=DEFAULT_GROUP&dataId=logback.xml
level:
root: info
#mybatis????
mybatis-plus:
type-aliases-package: com.njcn.main.pojo
mqtt:
client-id: @artifactId@${random.value}

View File

@@ -0,0 +1,13 @@
package com.njcn.main;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
@SpringBootTest
class MainBootApplicationTests {
@Test
void contextLoads() {
}
}