'SpringBoot security on heroku-deployed project even without using its dependency
I am using java 1.8 for Gradle SpringBoot restAPI.
I haven't used spring-boot-starter-security and API works accordingly but after deploying the same code on heroku the API asks for the signup.
I tried disabling it via following way,
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.security.servlet.SecurityAutoConfiguration;
@SpringBootApplication (exclude = { SecurityAutoConfiguration.class })
public class LawCaseApplication {
public static void main(String[] args) {
SpringApplication.run(LawCaseApplication.class, args);
}
}
But still after re-deploying the screen appeared. Then I tried giving it my own user name and password by writing the following in the application.properties as I wasn't getting any randomly generated password in the logs too,
spring.security.user.name="user"
spring.security.user.password="user"
And I am still getting this screen.
However, the dependencies I used are,
dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-jpa'
implementation 'org.springframework.boot:spring-boot-starter-web'
implementation 'org.projectlombok:lombok:1.18.20'
runtimeOnly 'org.postgresql:postgresql'
testImplementation 'org.springframework.boot:spring-boot-starter-test'
implementation "org.jsoup:jsoup:1.13.1"
implementation group: 'org.apache.commons', name: 'commons-lang3', version: '3.0'
}
I repeat that there is no security when run on local host but on the heroku deployed version.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|

