项目更新
This commit is contained in:
@@ -3,11 +3,10 @@
|
||||
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>nladmin</artifactId>
|
||||
<groupId>org.nl</groupId>
|
||||
<version>2.6</version>
|
||||
<artifactId>jl_wms</artifactId>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
</parent>
|
||||
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
|
||||
<artifactId>nladmin-system</artifactId>
|
||||
|
||||
@@ -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_wms</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>
|
||||
@@ -1,8 +0,0 @@
|
||||
package org.nl;
|
||||
|
||||
public class Cat implements IShout {
|
||||
@Override
|
||||
public void shout() {
|
||||
System.out.println("miao miao111");
|
||||
}
|
||||
}
|
||||
@@ -1,8 +0,0 @@
|
||||
package org.nl;
|
||||
|
||||
public class Dog implements IShout {
|
||||
@Override
|
||||
public void shout() {
|
||||
System.out.println("wang wang");
|
||||
}
|
||||
}
|
||||
@@ -1,5 +0,0 @@
|
||||
package org.nl;
|
||||
|
||||
public interface IShout {
|
||||
void shout();
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
|
||||
}
|
||||
@@ -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";
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -1,2 +0,0 @@
|
||||
org.nl.Cat
|
||||
org.nl.Dog
|
||||
@@ -1,2 +0,0 @@
|
||||
org.springframework.boot.autoconfigure.EnableAutoConfiguration=org.nl.starter.TianServiceAutoConfiguration
|
||||
|
||||
@@ -6,8 +6,8 @@
|
||||
|
||||
<groupId>org.nl</groupId>
|
||||
<artifactId>jl_wms</artifactId>
|
||||
<packaging>pom</packaging>
|
||||
<version>1.0-SNAPSHOT</version>
|
||||
<packaging>pom</packaging>
|
||||
<name>开发平台</name>
|
||||
<parent>
|
||||
<artifactId>nladmin</artifactId>
|
||||
@@ -17,7 +17,6 @@
|
||||
|
||||
<modules>
|
||||
<module>nladmin-system</module>
|
||||
<module>nladmin-test</module>
|
||||
</modules>
|
||||
<dependencies>
|
||||
|
||||
|
||||
Reference in New Issue
Block a user