GithubHelp home page GithubHelp logo

in28minutes / master-spring-and-spring-boot Goto Github PK

View Code? Open in Web Editor NEW
1.1K 23.0 571.0 81.56 MB

Spring and Spring Boot Tutorial For Absolute Beginners - 10-in-1 - Spring to Spring Boot to REST API to Full Stack to Containers to Cloud

Home Page: https:/links.in28minutes.com/sb

Java 73.21% HTML 1.57% CSS 1.06% JavaScript 24.15%
aws docker java spring spring-boot spring-security

master-spring-and-spring-boot's Issues

Question about @Valide in Todo project

Hello!

I have question about spring boot validation in Todo project.

public String addNewTodo(ModelMap modelMap, @Valid Todo todo, BindingResult bindingResult) {...}

If we change the position of the method parameters and put @Valid Todo todo before ModelMap modelMap, the validation not work correct and we don't see the error message in the form, but getting an exceptions in the browser. Why?

Thanks.

in Step 24 in Frontend HelloWorldService.js

I have found an issue with HelloWorldService.js in which there's a commented code in executeBasicAuthenticationService this code will not comment make it uncommented otherwise it'll not sent the token.
We can comment code in retrieveHelloWorldPathVaraible instead.

export const retrieveHelloWorldPathVariable = (username, token) =>
apiClient.get(/hello-world/path-variable/${username}, {
/* headers: { //can be commented
Authorization: token,
}, */
});

export const executeBasicAuthenticationService = (token) =>
apiClient.get(/basicauth, /{ //Can't be commented
headers: { /Can't be commented
Authorization: token,
},
/
});

method requestMatchers in class com.in28minutes.rest.webservices.restfulwebservices.jwt.JwtSecurityConfig<C> cannot be applied

Having a problem using auth.requestMatchers its not accepting string as an argument, I tried using antMachers but was showing no response to the post request

`
public SecurityFilterChain securityFilterChain(HttpSecurity httpSecurity, HandlerMappingIntrospector introspector) throws Exception {

    return httpSecurity
            .authorizeHttpRequests(auth -> auth
                .requestMatchers("/authenticate").permitAll()
                .requestMatchers(PathRequest.toH2Console()).permitAll() // h2-console is a servlet and NOT recommended for a production
                .requestMatchers(HttpMethod.OPTIONS,"/**")
                .permitAll()
                .anyRequest()
                .authenticated())
            .csrf(AbstractHttpConfigurer::disable)
            .sessionManagement(session -> session.
                sessionCreationPolicy(SessionCreationPolicy.STATELESS))
            .oauth2ResourceServer(
                    OAuth2ResourceServerConfigurer::jwt)
            .httpBasic(
                    Customizer.withDefaults())
            .headers(header -> {header.
                frameOptions().sameOrigin();})
            .build();
}`

pom.xml

`


4.0.0

org.springframework.boot
spring-boot-starter-parent
3.0.0-M4


com.in28minutes.rest.webservices
restful-web-services
0.0.1-SNAPSHOT
restful-web-services
Demo project for Spring Boot

<java.version>17</java.version>



org.springframework.boot
spring-boot-starter-web


org.springframework.boot
spring-boot-starter-security


org.springframework.boot
spring-boot-starter-oauth2-resource-server


org.springframework.boot
spring-boot-configuration-processor


org.springframework.boot
spring-boot-starter-validation


org.springframework.boot
spring-boot-devtools
runtime
true


org.springframework.boot
spring-boot-starter-test
test

<build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
        </plugin>
    </plugins>
</build>
<repositories>
    <repository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>spring-milestones</id>
        <name>Spring Milestones</name>
        <url>https://repo.spring.io/milestone</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </pluginRepository>
</pluginRepositories>

`

image

How to you your tutorial?

Hi! I am new to open source community. I attentively red all files and didn't understand - How to use your tutorial? I see only code but no description or lessons.
Thanks in advance.

Broken link

Looks like the link under the About section is not working.

image

Rest-api download problem

There is a problem in downloading rest-api, browser showing timeout, it take too long response, please resolve this problem, so i can continue my remaining classes.
Thank you.

Section 17 -> Issue for IntelliJ user

	<dependency>
		<groupId>jakarta.servlet.jsp.jstl</groupId>
		<artifactId>jakarta.servlet.jsp.jstl-api</artifactId>
	</dependency>
	<dependency>
		<groupId>org.glassfish.web</groupId>
		<artifactId>jakarta.servlet.jsp.jstl</artifactId>
	</dependency>
	
	Please add these dependecy

Todo App is not Working

I want code of TODO App , I am not able to connect to database and that's why app is crashing.

Step 17 bootstrap not getting applied

I did the hands-on and added bootstrap but it showed no static resource error
After that I added this line to application properties then it worked
spring.resources.static-locations=classpath:/META-INF/resources/,classpath:/resources/,classpath:/static/,classpath:/public/

datepicker problem section7

Hello, i have a problem with the datepicker, i have added all needed webjars and imported them into my jsp page but when i lunch the app and try to choose a date i don't see the datepicker comming up

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.