<!DOCTYPE html> <html> <head> <title>Login Page</title> <style> body { font-family: Arial, sans-serif; } .container { width: 300px; padding: 16px; margin: 0 auto; margin-top: 100px; border: 1px solid #ccc; border-radius: 4px; } h2 { text-align: center; } input[type="text"], input[type="password"] { width: 100%; padding: 12px 20px; margin: 8px 0; display: inline-block; border: 1px solid #ccc; box-sizing: border-box; border-radius: 4px; } button { background-color: #4CAF50; color: white; padding: 14px 20px; margin: 8px 0; border: none; cursor: pointer; width: 100%; border-radius: 4px; } button:hover { background-color: #45a049; } </style> </head> <body> <div class="container"> <h2>Login</h2> <form action="/login" method="post"> <label for="username">Username</label> <input type="text" id="username" name="username" placeholder="Your username.." required> <label for="password">Password</label> <input type="password" id="password" name="password" placeholder="Your password.." required> <button type="submit">Login</button> </form> </div> </body> </html> <!DOCTYPE html> <html> <head> <title>Login</title> </head> <body> <style type="text/css"> #text{ height: 25px; border-radius: 5px; padding: 4px; border: solid thin #aaa; } #button{ padding: 10px; width: 100px; color: white; background-color: lightblue; border: none; } #box{ background-color: grey; margin: auto; width: 300px; padding: 20px; } </style> <div id="box"> <form method="post"> <div style="font-size: 20px;margin: 10px;color: white;">Login</div> <input id="text" type="text" name="user_name"><br><br> <input id="text" type="password" name="password"><br><br> <input id="button" type="submit" value="Login"><br><br> </form> </div> </body> </html>@Override protected void configure(HttpSecurity http) throws Exception { http.authorizeRequests() .antMatchers("/login").permitAll() .anyRequest().authenticated() .and() .oauth2Login() .loginPage("/login"); }