Skip to content
This repository was archived by the owner on Dec 12, 2018. It is now read-only.

Commit 6d80bf1

Browse files
committed
Updated packages to match spring boot
1 parent b1f96d2 commit 6d80bf1

File tree

28 files changed

+40
-31
lines changed

28 files changed

+40
-31
lines changed

tutorials/spring/00-the-basics/src/main/java/com/stormpath/tutorial/WebAppInitializer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package com.stormpath.tutorial;
1717

18+
import com.stormpath.tutorial.config.WebAppConfig;
1819
import org.springframework.web.WebApplicationInitializer;
1920
import org.springframework.web.context.ContextLoaderListener;
2021
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;

tutorials/spring/00-the-basics/src/main/java/com/stormpath/tutorial/WebAppConfig.java renamed to tutorials/spring/00-the-basics/src/main/java/com/stormpath/tutorial/config/WebAppConfig.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.stormpath.tutorial;
16+
package com.stormpath.tutorial.config;
1717

1818
import com.stormpath.sdk.application.Application;
1919
import com.stormpath.sdk.client.Client;
@@ -34,7 +34,7 @@
3434
@EnableWebMvc
3535
@EnableStormpath //Stormpath base beans
3636
@EnableStormpathWebMvc //Stormpath web mvc beans plus out-of-the-box views
37-
@ComponentScan
37+
@ComponentScan("com.stormpath.tutorial")
3838
@PropertySource("classpath:application.properties")
3939
public class WebAppConfig {
4040

tutorials/spring/00-the-basics/src/main/java/com/stormpath/tutorial/HelloController.java renamed to tutorials/spring/00-the-basics/src/main/java/com/stormpath/tutorial/controller/HelloController.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.stormpath.tutorial;
16+
package com.stormpath.tutorial.controller;
1717

1818
import com.stormpath.sdk.application.Application;
1919
import com.stormpath.sdk.servlet.application.ApplicationResolver;

tutorials/spring/01-some-access-controls/src/main/java/com/stormpath/tutorial/WebAppInitializer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@
1515
*/
1616
package com.stormpath.tutorial;
1717

18+
import com.stormpath.tutorial.config.WebAppConfig;
1819
import org.springframework.web.WebApplicationInitializer;
1920
import org.springframework.web.context.ContextLoaderListener;
2021
import org.springframework.web.context.support.AnnotationConfigWebApplicationContext;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.stormpath.tutorial;
16+
package com.stormpath.tutorial.config;
1717

1818
import com.stormpath.sdk.application.Application;
1919
import com.stormpath.sdk.client.Client;
@@ -34,7 +34,7 @@
3434
@EnableWebMvc
3535
@EnableStormpath //Stormpath base beans
3636
@EnableStormpathWebMvc //Stormpath web mvc beans plus out-of-the-box views
37-
@ComponentScan
37+
@ComponentScan("com.stormpath.tutorial")
3838
@PropertySource("classpath:application.properties")
3939
public class WebAppConfig {
4040

tutorials/spring/01-some-access-controls/src/main/java/com/stormpath/tutorial/HelloController.java renamed to tutorials/spring/01-some-access-controls/src/main/java/com/stormpath/tutorial/controller/HelloController.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.stormpath.tutorial;
16+
package com.stormpath.tutorial.controller;
1717

1818
import com.stormpath.sdk.servlet.account.AccountResolver;
1919
import org.springframework.stereotype.Controller;
@@ -29,13 +29,13 @@
2929
public class HelloController {
3030

3131
@RequestMapping("/")
32-
String home(HttpServletRequest req, Model model) {
32+
public String home(HttpServletRequest req, Model model) {
3333
model.addAttribute("status", req.getParameter("status"));
3434
return "home";
3535
}
3636

3737
@RequestMapping("/restricted")
38-
String restricted(HttpServletRequest req) {
38+
public String restricted(HttpServletRequest req) {
3939
if (AccountResolver.INSTANCE.getAccount(req) != null) {
4040
return "restricted";
4141
}

tutorials/spring/02-spring-security-ftw/src/main/java/com/stormpath/tutorial/WebAppInitializer.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
package com.stormpath.tutorial;
22

33
import com.stormpath.sdk.servlet.filter.StormpathFilter;
4+
import com.stormpath.tutorial.config.SpringSecurityWebAppConfig;
45
import org.springframework.security.web.context.AbstractSecurityWebApplicationInitializer;
56
import org.springframework.web.WebApplicationInitializer;
67
import org.springframework.web.context.ContextLoaderListener;
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.stormpath.tutorial;
16+
package com.stormpath.tutorial.config;
1717

1818
import com.stormpath.spring.config.EnableStormpathWebSecurity;
1919
import org.springframework.context.annotation.ComponentScan;
@@ -28,7 +28,7 @@
2828
* @since 1.3.0
2929
*/
3030
@Configuration
31-
@ComponentScan
31+
@ComponentScan("com.stormpath.tutorial")
3232
@PropertySource("classpath:application.properties")
3333
@EnableStormpathWebSecurity
3434
public class SpringSecurityWebAppConfig extends WebSecurityConfigurerAdapter {
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.stormpath.tutorial;
16+
package com.stormpath.tutorial.controller;
1717

1818
import org.springframework.stereotype.Controller;
1919
import org.springframework.ui.Model;
Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,9 +13,10 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
package com.stormpath.tutorial;
16+
package com.stormpath.tutorial.controller;
1717

1818
import com.stormpath.sdk.servlet.account.AccountResolver;
19+
import com.stormpath.tutorial.service.HelloService;
1920
import org.springframework.beans.factory.annotation.Autowired;
2021
import org.springframework.stereotype.Controller;
2122
import org.springframework.ui.Model;

0 commit comments

Comments
 (0)