Precedence order among properties file, YAML file, and Command Line arguments in SpringBoot

Spring Boot property resolution property order is described here. Use of application.properties and application.yaml is not expected. Use one format or the other but not both. Whichever one you use will be handled at position 12 or 13 (depending on whether the file is packaged in the application JAR or not) in property precedence order. … Read more

Spring Boot 2.0 disable default security

According to the new updates in Spring 2.0, if Spring Security is on the classpath, Spring Boot will add @EnableWebSecurity.So adding entries to the application.properties ain’t gonna work (i.e it is no longer customizable that way). For more information visit the official website Security changes in Spring Boot 2.0 Albeit not sure about your requirement … Read more

Spring Boot java.lang.NoClassDefFoundError: javax/servlet/Filter

for the maven users, comment the scope provided in the following dependency: <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-tomcat</artifactId> <!–<scope>provided</scope>–> </dependency> UPDATE As feed.me mentioned you have to uncomment the provided part depending on what kind of app you are deploying. Here is a useful link with the details: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#build-tool-plugins-maven-packaging

Spring Security with SOAP web service is working in Tomcat, but not in WebLogic

I just wanted to update the alternate solution I found for this problem, for completeness. Spring Security Filter chain was not working for Weblogic, where as same was working in Tomcat, even for Weblogic version 12.2.1.4. I had followed this example, and implemented Okta filter as spring boot version was not working in Weblogic 12.2.1.4. … Read more

Eureka and Kubernetes

How can I setup something like eureka.client.serviceUri? You have to have a Kubernetes service on top of the eureka pods/deployments which then will provide you a referable IP address and port number. And then use that referable address to look up the Eureka service, instead of “8761”. To address further question about HA configuration of … Read more

Difference between using MockMvc with SpringBootTest and Using WebMvcTest

@SpringBootTest is the general test annotation. If you’re looking for something that does the same thing prior to 1.4, that’s the one you should use. It does not use slicing at all which means it’ll start your full application context and not customize component scanning at all. @WebMvcTest is only going to scan the controller … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)