代码更新

This commit is contained in:
ldj_willow
2022-08-12 09:50:57 +08:00
parent dee694a126
commit 922b24bf66
13 changed files with 0 additions and 175 deletions

View File

@@ -31,21 +31,6 @@
<artifactId>mongo-java-driver</artifactId>
<version>3.4.2</version>
</dependency>
<!--
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>1.1.11</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>1.1.11</version>
</dependency>
-->
<!-- JetCache Redis 依赖-->
<dependency>
<groupId>com.alicp.jetcache</groupId>

View File

@@ -1,39 +0,0 @@
<?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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>llsh_acs</artifactId>
<groupId>org.nl</groupId>
<version>1.0-SNAPSHOT</version>
</parent>
<modelVersion>4.0.0</modelVersion>
<version>2.6</version>
<artifactId>nladmin-test</artifactId>
<dependencies>
<dependency>
<groupId>org.nl</groupId>
<artifactId>nladmin-system</artifactId>
<version>2.6</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-autoconfigure</artifactId>
<version>2.0.0.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-configuration-processor</artifactId>
<version>2.0.0.RELEASE</version>
<optional>true</optional>
</dependency>
</dependencies>
</project>

View File

@@ -1,8 +0,0 @@
package org.nl;
public class Cat implements IShout {
@Override
public void shout() {
System.out.println("miao miao111");
}
}

View File

@@ -1,8 +0,0 @@
package org.nl;
public class Dog implements IShout {
@Override
public void shout() {
System.out.println("wang wang");
}
}

View File

@@ -1,5 +0,0 @@
package org.nl;
public interface IShout {
void shout();
}

View File

@@ -1,27 +0,0 @@
package org.nl;
import io.swagger.annotations.Api;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import java.util.ServiceLoader;
@RestController
@RequiredArgsConstructor
@Api(tags = "运维:应用管理")
@RequestMapping("/api/test")
public class Test111 {
public static void main(String[] args) {
ServiceLoader<IShout> shouts = ServiceLoader.load(IShout.class);
for (IShout s : shouts) {
s.shout();
}
}
@GetMapping(value = "/test")
public String getStr() {
return "hello";
}
}

View File

@@ -1,11 +0,0 @@
package org.nl.starter;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;
@ConfigurationProperties(prefix = "spring.tian")
@Data
public class TianProperties {
private String name;
private int age;
private String sex = "M";
}

View File

@@ -1,15 +0,0 @@
package org.nl.starter;
public class TianService {
private TianProperties properties;
public TianService() {
}
public TianService(TianProperties userProperties) {
this.properties = userProperties;
}
public void sayHello(){
System.out.println("hi, 我叫: " + properties.getName() +
", 今年" + properties.getAge() + ""
+ ", 性别: " + properties.getSex());
}
}

View File

@@ -1,23 +0,0 @@
package org.nl.starter;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnClass;
import org.springframework.boot.autoconfigure.condition.ConditionalOnMissingBean;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
@Configuration
@EnableConfigurationProperties(TianProperties.class)
@ConditionalOnClass(TianService.class)
@ConditionalOnProperty(prefix = "spring.tian", value = "enabled", matchIfMissing = true)
public class TianServiceAutoConfiguration {
@Autowired
private TianProperties properties;
@Bean
@ConditionalOnMissingBean(TianService.class)
public TianService tianService() {
return new TianService(properties);
}
}

View File

@@ -1,2 +0,0 @@
org.nl.Cat
org.nl.Dog

View File

@@ -1,2 +0,0 @@
org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.nl.starter.TianServiceAutoConfiguration

View File

@@ -1,19 +0,0 @@
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject;
import java.util.HashMap;
public class Test {
public static void main(String[] args) {
JSONObject json=new JSONObject();
json.put("id","1493102834739187714");
System.out.println(json.getLong("id"));
System.out.println(json.getString("id"));
HashMap map=new HashMap();
map.put("a","1");
map.put("b","2");
JSONObject jsonObject = JSONObject.parseObject(JSON.toJSONString(map));
System.out.println(jsonObject);
}
}

View File

@@ -17,7 +17,6 @@
<modules>
<module>nladmin-system</module>
<module>nladmin-test</module>
</modules>
<dependencies>