小编Dan*_*ank的帖子

Microsoft Azure上的Spring Boot应用程序

我想知道是否可以将带有MySQL数据库的spring boot应用程序部署到azure云中.我找不到任何说明或教程.

azure spring-boot

10
推荐指数
1
解决办法
8145
查看次数

带身份验证的Spring启动 - 找不到登录页面(404)

我的弹簧应用程序有问题,因为我试图包含一些安全性的东西.

在构建一个包含angularJS的小型工作应用程序后,我遵循了这个春季安全教程,但我无法启动它.当我尝试访问应用程序的任何部分时,安全模块想要重定向到http:// localhost:8080/login ...但找不到它.

出现意外错误(type = Not Found,status = 404).没有可用的消息

也许我只是错过了一件小事,但我无法弄清楚它是什么^^

这是我的代码......

文件夹结构:

src/main/java
 +-Application.java
 +-SecurityConfiguration.java

src/main/resources
 +-static
  +-index.html
 +-templates
  +-login.html
Run Code Online (Sandbox Code Playgroud)

pom.xml中:

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.3.0.BUILD-SNAPSHOT</version>
</parent>

<!-- Additional lines to be added here... -->
<dependencies>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-web</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-thymeleaf</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-data-jpa</artifactId>
    </dependency>
    <dependency>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-security</artifactId>
    </dependency>
    <dependency>
        <groupId>org.postgresql</groupId>
        <artifactId>postgresql</artifactId>
        <version>9.3-1100-jdbc4</version>
    </dependency>
    <dependency>
        <groupId>com.googlecode.json-simple</groupId>
        <artifactId>json-simple</artifactId>
    </dependency>

</dependencies>
Run Code Online (Sandbox Code Playgroud)

Application.java:

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.EnableAutoConfiguration;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;

@Configuration
@EnableAutoConfiguration
@ComponentScan
public …
Run Code Online (Sandbox Code Playgroud)

java spring spring-mvc spring-security spring-boot

8
推荐指数
1
解决办法
1万
查看次数

标签 统计

spring-boot ×2

azure ×1

java ×1

spring ×1

spring-mvc ×1

spring-security ×1