Get rid of custom.properties
This commit is contained in:
parent
1ccfdebc41
commit
4b7d77eb1d
|
@ -1,24 +1,13 @@
|
|||
package com.baeldung.idc;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import org.springframework.boot.SpringApplication;
|
||||
import org.springframework.boot.autoconfigure.SpringBootApplication;
|
||||
import org.springframework.boot.builder.SpringApplicationBuilder;
|
||||
import org.springframework.context.annotation.ComponentScan;
|
||||
import org.springframework.context.annotation.PropertySource;
|
||||
|
||||
@SpringBootApplication
|
||||
@ComponentScan(basePackages = "com.baeldung.idc")
|
||||
@PropertySource(value = { "classpath:/custom.properties" }, ignoreResourceNotFound = true)
|
||||
public class Application {
|
||||
|
||||
public static void main(String[] args) {
|
||||
final SpringApplicationBuilder builder = new SpringApplicationBuilder(Application.class);
|
||||
final Map<String, Object> map = new HashMap<>();
|
||||
map.put("spring.config.name", "custom.properties");
|
||||
builder.properties(map).run(args);
|
||||
|
||||
SpringApplication.run(Application.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -1,2 +0,0 @@
|
|||
server.port=8080
|
||||
spring.autoconfigure.exclude=org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration
|
Loading…
Reference in New Issue