koushikkothagal / spring-security-jpa Goto Github PK
View Code? Open in Web Editor NEWCode for full Spring Security + JPA + MySQL tutorial: https://youtu.be/TNt3GHuayXs
Code for full Spring Security + JPA + MySQL tutorial: https://youtu.be/TNt3GHuayXs
The problem I had was How to return a html page from a restful controller in spring boot?
Must put the html files in resources/templates/ or resources / public.
Replace the @RestController with @controller.
Add dependency on thymeleaf.
Remove if you are using any view resolvers.
Your controller method should return file name of view without extension like return "index.html, user.html, admin.html".
Add view name is: 'login.html' (full file name).
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-thymeleaf</artifactId>
</dependency>
and
@RestController
public class MyRestController {
@RequestMapping("/")
public ModelAndView welcome() {
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("login.html");
return modelAndView;
}
}
locahost:port/user
is protected but locahost:port/user/
(with one / ) isn't protected. I am also facing same issue and he seems to have the same issue though. Similar for other endpoints as well.
"spring.jpa.hibernate.naming-strategy=org.hibernate.cfg.ImprovedNamingStrategy"
This line is creating an error. Use "spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl" instead.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.